Click or drag to resize

ConcentratorBase Class

Measurement concentrator base class.
Inheritance Hierarchy
SystemObject
  GSF.TimeSeriesConcentratorBase
    GSF.TimeSeries.AdaptersActionAdapterBase

Namespace: GSF.TimeSeries
Assembly: GSF.TimeSeries (in GSF.TimeSeries.dll) Version: 2.4.181-beta
Syntax
public abstract class ConcentratorBase : IDisposable
View Source

The ConcentratorBase type exposes the following members.

Constructors
 NameDescription
Protected methodConcentratorBase Creates a new ConcentratorBase.
Protected methodConcentratorBase(Int32, Double, Double) Creates a new ConcentratorBase from specified parameters.
Top
Properties
 NameDescription
Public propertyAllowPreemptivePublishing Gets or sets flag that allows system to preemptively publish frames assuming all ExpectedMeasurements have arrived.
Public propertyAllowSortsByArrival Gets or sets flag that determines whether or not to allow incoming measurements with bad timestamps to be sorted by arrival time.
Public propertyAveragePublicationTimePerFrame Gets the average required frame publication time, in seconds.
Public propertyDiscardedMeasurements Gets the total number of measurements that have been discarded because of old timestamps (i.e., measurements that were outside the time deviation tolerance from base time, past or future).
Public propertyDownsampledMeasurements Gets the total number of down-sampled measurements processed by the concentrator.
Public propertyDownsamplingMethod Gets or sets the DownsamplingMethod to be used by the concentrator.
Public propertyEnabled Gets or sets the current enabled state of concentrator.
Public propertyExpectedMeasurements Gets or sets the expected number of measurements to be assigned to a single frame.
Public propertyFramesAheadOfSchedule Gets the total number of frames ahead of schedule processed by the concentrator.
Public propertyFramesPerSecond Gets or sets the number of frames per second.
Public propertyIgnoreBadTimestamps Gets or sets flag that determines if bad timestamps (as determined by measurement's timestamp quality) should be ignored when sorting measurements.
Public propertyLagTicks Gets defined past time deviation tolerance, in ticks.
Public propertyLagTime Gets or sets the allowed past time deviation tolerance, in seconds (can be sub-second).
Public propertyLastDiscardedMeasurement Gets a reference the last IMeasurement that was discarded by the concentrator.
Public propertyLastDiscardedMeasurementLatency Gets the calculated latency of the last IMeasurement that was discarded by the concentrator.
Public propertyLastFrame Gets reference to the last published IFrame.
Public propertyLatestMeasurements Gets reference to the collection of absolute latest received measurement values.
Public propertyLeadTime Gets or sets the allowed future time deviation tolerance, in seconds (can be sub-second).
Protected propertyLog Log messages generated by an adapter.
Public propertyMaximumPublicationTimeout Gets or sets the maximum frame publication timeout in milliseconds, set to Infinite(-1) to wait indefinitely.
Public propertyMeasurementsSortedByArrival Gets the total number of measurements that were sorted by arrival because the measurement reported a bad timestamp quality.
Public propertyMissedSortsByTimeout Gets the total number of missed sorts by timeout processed by the concentrator.
Public propertyPerformTimestampReasonabilityCheck Gets or sets flag that determines if timestamp reasonability checks should be performed on incoming measurements (i.e., measurement timestamps are compared to system clock for reasonability using LeadTime tolerance).
Public propertyProcessByReceivedTimestamp Gets or sets flag that determines if concentrator should sort measurements by received time.
Public propertyProcessedMeasurements Gets the total number of measurements successfully sorted.
Public propertyProcessingInterval Gets or sets the desired processing interval, in milliseconds, for the adapter.
Public propertyPublishedFrames Gets the total number of published frames.
Public propertyPublishedMeasurements Gets the total number of published measurements.
Public propertyQueueState Gets detailed state of concentrator frame queue.
Public propertyRealTime Gets the most accurate time value that is available. If UseLocalClockAsRealTime = true, then this function will return UtcNow. Otherwise, this function will return the timestamp of the most recent measurement, or UtcNow if no measurement timestamps are within time deviation tolerances as specified by the LeadTime value.
Public propertyReceivedMeasurements Gets the total number of measurements ever requested for sorting.
Public propertyRoundToNearestTimestamp Gets or sets a value to indicate whether the concentrator should round to the nearest frame timestamp rather than rounding down to the nearest timestamps.
Public propertyRunTime Gets the total amount of time, in seconds, that the concentrator has been active.
Public propertyStartTime Gets the UTC time the concentrator was started.
Public propertyStatus Gets current detailed state and status of concentrator for display purposes.
Public propertyStopTime Gets the UTC time the concentrator was stopped.
Public propertyTicksPerFrame Gets the number of ticks per frame.
Public propertyTimeResolution Gets or sets the maximum time resolution, in ticks, to use when sorting measurements by timestamps into their proper destination frame.
Public propertyTotalPublicationTime Gets the total number of seconds frames have spent in the publication process since concentrator started.
Public propertyTrackLatestMeasurements Gets or sets flag to start tracking the absolute latest received measurement values.
Public propertyUseLocalClockAsRealTime Gets or sets flag that determines whether or not to use the local clock time as real-time.
Public propertyUsePrecisionTimer Gets or sets flag that determines if precision timer should be used for frame publication.
Public propertyWaitHandleExpirations Gets the total number of wait handle expirations encountered due to delayed precision timer releases.
Top
Methods
 NameDescription
Protected methodAssignMeasurementToFrame Assigns IMeasurement to its associated IFrame.
Protected methodCreateNewFrame Creates a new IFrame for the given timestamp.
Public methodDispose Releases all the resources used by the ConcentratorBase object.
Protected methodDispose(Boolean) Releases the unmanaged resources used by the ConcentratorBase object and optionally releases the managed resources.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Releases the unmanaged resources before the ConcentratorBase object is reclaimed by GC.
(Overrides ObjectFinalize)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodMillisecondsFromRealTime Returns the deviation, in milliseconds, that the given number of ticks is from real-time (i.e., RealTime).
Protected methodOnDiscardingMeasurements Raises the DiscardingMeasurements event.
Protected methodOnProcessException(Exception)Obsolete.
Raises the ProcessException event.
Protected methodOnProcessException(MessageLevel, Exception, String, MessageFlags) Raises the ProcessException event.
Protected methodOnUnpublishedSamples Raises the UnpublishedSamples event.
Protected methodPublishFrame Publish IFrame of time-aligned collection of IMeasurement values that arrived within the concentrator's defined LagTime.
Public methodResetStatistics Resets the statistics of the concentrator.
Public methodSecondsFromRealTime Returns the deviation, in seconds, that the given number of ticks is from real-time (i.e., RealTime).
Public methodSortMeasurement Sorts the IMeasurement placing the data point in its proper IFrame.
Public methodSortMeasurements Sorts each IMeasurement placing each data point in its proper IFrame.
Public methodStart Starts the concentrator, if it is not already running.
Public methodStop Stops the concentrator.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Events
 NameDescription
Public eventDiscardingMeasurements This event is raised if there are any measurements being discarded during the sorting process.
Public eventDisposed This event is raised when ConcentratorBase is disposed.
Public eventProcessException This event is raised if there is an exception encountered while attempting to process a frame in the sample queue.
Public eventUnpublishedSamples This event is raised every 5 seconds allowing consumer to track current number of unpublished seconds of data in the queue.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks

This class synchronizes (i.e., sorts by timestamp) real-time measurements.

Note that your lag time should be defined as it relates to the rate at which data is coming into the concentrator. Make sure you allow enough time for transmission of data over the network allowing any needed time for possible network congestion. Lead time should be defined as your confidence in the accuracy of your local clock (e.g., if you set lead time to 2, this means you trust that your local clock is within plus or minus 2 seconds of real-time.)

This concentrator is designed to sort measurements being transmitted in real-time for data being sent at rates of at least 1 sample per second. Slower rates (e.g., once every few seconds) are not supported since sorting data at these speeds would be trivial. There is no defined maximum number of supported samples per second - but keep in mind that CPU utilization will increase as the measurement volume and frame rate increase.

See Also