Output
|
protected abstract void ProcessMeasurements( IMeasurement[] measurements )
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:
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(); } }