OutputAdapterBaseProcessMeasurements Method

Serializes measurements to data output stream.

Definition

Namespace: Gemstone.Timeseries.Adapters
Assembly: Gemstone.Timeseries (in Gemstone.Timeseries.dll) Version: 1.0.128 -- Release Build+e2476c52e94864f123f37e60764c948e49eb89eb
protected abstract void ProcessMeasurements(
	IMeasurement[] measurements
)

Parameters

measurements  IMeasurement

[Missing <param name="measurements"/> documentation for "M:Gemstone.Timeseries.Adapters.OutputAdapterBase.ProcessMeasurements(Gemstone.Timeseries.IMeasurement[])"]

Remarks

Derived classes must implement this function to process queued measurements. For example, this function would "archive" measurements if output adapter is for a historian.

It is important that consumers "resume" connection cycle if processing fails (e.g., connection to archive is lost). Here is an example:

Example

C#
protected virtual void ProcessMeasurements(IMeasurement[] measurements)
{
    try
    {
        // Process measurements...
        foreach (IMeasurement measurement in measurement)
        {
            ArchiveMeasurement(measurement);
        }
    }
    catch (Exception)
    {                
        // So long as user hasn't requested to stop, restart connection cycle
        if (Enabled)
            Start();
    }
}

See Also