C# Class GSF.Historian.Exporters.ExporterBase

Base class for an exporter of real-time time-series data.
Inheritance: IExporter
显示文件 Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
DatasetTemplate ( string dataTableName ) : DataSet

Returns a template DataSet that can be used for storing time-series data in a tabular format.

The returned DataSet consists of two DataTables with the following structure:

Table 1 is to be used for storing time-series data. Column Name Column Description Instance Historian instance providing the time-series data. ID IDataPoint.HistorianID of the time-series data. Time IDataPoint.Time of the time-series data. Value IDataPoint.Value of the time-series data. Quality IDataPoint.Quality of the time-series data. Table 2 is to be used for providing information about Table 1. Column Name Column Description RunTime DateTime (in UTC) when the data in Table 1 was populated. RecordCount Number of time-series data points in Table 1. RefreshSchedule Interval (in seconds) at which the data in Table 1 is to be refreshed.

Dispose ( ) : void

Releases all the resources used by the exporter.

Equals ( object obj ) : bool

Determines whether the current exporter object is equal to obj.

FindExport ( string exportName ) : Export

Returns the Export for the specified exportName from the Exports.

FindListener ( string listenerName ) : DataListener

Returns the DataListener for the specified listenerName from the Listeners.

GetHashCode ( ) : int

Returns the hash code for the current exporter object.

ProcessExport ( string exportName ) : void

Processes Export with the specified exportName.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the exporter and optionally releases the managed resources.

ExporterBase ( string name ) : System

Initializes a new instance of the exporter.

GetExportData ( Export export ) : IList>.Dictionary

Returns the current time-series data for the specified export organized by listener.

GetExportDataAsDataset ( Export export, string dataTableName ) : DataSet

Returns the current time-series data for the specified export in a DataSet.

OnExportProcessException ( Export export, Exception exception ) : void

Raises the ExportProcessException event.

OnExportProcessed ( Export export ) : void

Raises the ExportProcessed event.

OnStatusUpdate ( string status ) : void

Raises the StatusUpdate event.

ProcessExport ( Export export ) : void

When overridden in a derived class, processes the export using the current DataListener.Data.

ProcessRealTimeData ( object sender, EventArgs e ) : void

Handles the DataListener.DataExtracted event for all the Listeners.

ProcessRealTimeExport ( Export export, DataListener listener, IList data ) : void

When overridden in a derived class, processes the export using the real-time data.

Private Methods

Method Description
ExportTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
Exports_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
Listeners_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
ProcessExports ( Export items ) : void

Processes non-real-time exports.

ProcessRealTimeExports ( RealTimeData items ) : void

Processes real-time exports.

Method Details

DatasetTemplate() public static method

Returns a template DataSet that can be used for storing time-series data in a tabular format.

The returned DataSet consists of two DataTables with the following structure:

Table 1 is to be used for storing time-series data. Column Name Column Description Instance Historian instance providing the time-series data. ID IDataPoint.HistorianID of the time-series data. Time IDataPoint.Time of the time-series data. Value IDataPoint.Value of the time-series data. Quality IDataPoint.Quality of the time-series data. Table 2 is to be used for providing information about Table 1. Column Name Column Description RunTime DateTime (in UTC) when the data in Table 1 was populated. RecordCount Number of time-series data points in Table 1. RefreshSchedule Interval (in seconds) at which the data in Table 1 is to be refreshed.

public static DatasetTemplate ( string dataTableName ) : DataSet
dataTableName string Name of the that will be used for storing the time-series data.
return System.Data.DataSet

Dispose() public method

Releases all the resources used by the exporter.
public Dispose ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the exporter and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

Equals() public method

Determines whether the current exporter object is equal to obj.
public Equals ( object obj ) : bool
obj object Object against which the current exporter object is to be compared for equality.
return bool

ExporterBase() protected method

Initializes a new instance of the exporter.
protected ExporterBase ( string name ) : System
name string Name of the exporter.
return System

FindExport() public method

Returns the Export for the specified exportName from the Exports.
public FindExport ( string exportName ) : Export
exportName string of the to be retrieved.
return Export

FindListener() public method

Returns the DataListener for the specified listenerName from the Listeners.
public FindListener ( string listenerName ) : DataListener
listenerName string of the to be retrieved.
return DataListener

GetExportData() protected method

Returns the current time-series data for the specified export organized by listener.
protected GetExportData ( Export export ) : IList>.Dictionary
export Export whose current time-series data is to be returned.
return IList>.Dictionary

GetExportDataAsDataset() protected method

Returns the current time-series data for the specified export in a DataSet.
protected GetExportDataAsDataset ( Export export, string dataTableName ) : DataSet
export Export whose current time-series data is to be returned.
dataTableName string Name of the containing the time-series data.
return System.Data.DataSet

GetHashCode() public method

Returns the hash code for the current exporter object.
public GetHashCode ( ) : int
return int

OnExportProcessException() protected method

Raises the ExportProcessException event.
protected OnExportProcessException ( Export export, Exception exception ) : void
export Export to send to event.
exception System.Exception to send to event.
return void

OnExportProcessed() protected method

Raises the ExportProcessed event.
protected OnExportProcessed ( Export export ) : void
export Export to send to event.
return void

OnStatusUpdate() protected method

Raises the StatusUpdate event.
protected OnStatusUpdate ( string status ) : void
status string Status update message to send to event.
return void

ProcessExport() protected abstract method

When overridden in a derived class, processes the export using the current DataListener.Data.
protected abstract ProcessExport ( Export export ) : void
export Export to be processed.
return void

ProcessExport() public method

Processes Export with the specified exportName.
does not exist for the specified .
public ProcessExport ( string exportName ) : void
exportName string of the to be processed.
return void

ProcessRealTimeData() protected method

Handles the DataListener.DataExtracted event for all the Listeners.
protected ProcessRealTimeData ( object sender, EventArgs e ) : void
sender object object that raised the event.
e EventArgs object where is the collection of real-time time-sereis data received.
return void

ProcessRealTimeExport() protected abstract method

When overridden in a derived class, processes the export using the real-time data.
protected abstract ProcessRealTimeExport ( Export export, DataListener listener, IList data ) : void
export Export to be processed.
listener DataListener that provided the .
data IList Real-time time-series data received by the .
return void