protected override void PublishFrame(IFrame frame, int index)
{
IDictionary<MeasurementKey, IMeasurement> measurements = frame.Measurements;
if (measurements.Count > 0)
{
// We display export status every other minute
if (new DateTime(frame.Timestamp).Minute % 2 == 0)
{
//Make sure message is only displayed once during the minute
if (!m_statusDisplayed)
{
//OnStatusMessage(string.Format("{0} successful file based measurement exports...", m_dataExporter.TotalExports));
m_statusDisplayed = true;
}
}
else
m_statusDisplayed = false;
}
else
{
// No data was available in the frame, lag time set too tight?
OnProcessException(MessageLevel.Warning, new InvalidOperationException("No measurements were available for COMTRADE file based data export, possible reasons: system is initializing , receiving no data or lag time is too small. COMTRADE File creation was skipped."));
}
}