C# Class GSF.TimeSeries.Adapters.InputAdapterBase

Represents the base class for any incoming input adapter.
Derived classes are expected to call OnNewMeasurements when new measurements are received.
Inheritance: AdapterBase, IInputAdapter
Datei anzeigen Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
Initialize ( ) : void

Initializes InputAdapterBase.

Start ( ) : void

Starts this InputAdapterBase and initiates connection cycle to data input source.

Stop ( ) : void

Stops this InputAdapterBase and disconnects from data input source.

Protected Methods

Method Description
AttemptConnection ( ) : void

Attempts to connect to data input source.

Derived classes should attempt connection to data input source here. Any exceptions thrown by this implementation will result in restart of the connection cycle.

AttemptDisconnection ( ) : void

Attempts to disconnect from data input source.

Derived classes should attempt disconnect from data input source here. Any exceptions thrown by this implementation will be reported to host via AdapterBase.ProcessException event.

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the InputAdapterBase object and optionally releases the managed resources.

InputAdapterBase ( ) : System

Constructs a new instance of the InputAdapterBase.

OnConnected ( ) : void

Called when data input source connection is established.

Derived classes should call this method manually if UseAsyncConnect is true.

OnDisconnected ( ) : void

Called when data input source is disconnected.

Derived classes should call this method manually if UseAsyncConnect is true.

OnNewMeasurements ( ICollection measurements ) : void

Raises the NewMeasurements event.

OnProcessingComplete ( ) : void

Raises the ProcessingComplete event.

Private Methods

Method Description
AttemptConnectionOperation ( ) : void
m_connectionTimer_Elapsed ( object sender, EventArgs e ) : void

Method Details

AttemptConnection() protected abstract method

Attempts to connect to data input source.
Derived classes should attempt connection to data input source here. Any exceptions thrown by this implementation will result in restart of the connection cycle.
protected abstract AttemptConnection ( ) : void
return void

AttemptDisconnection() protected abstract method

Attempts to disconnect from data input source.
Derived classes should attempt disconnect from data input source here. Any exceptions thrown by this implementation will be reported to host via AdapterBase.ProcessException event.
protected abstract AttemptDisconnection ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the InputAdapterBase object 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

Initialize() public method

Initializes InputAdapterBase.
public Initialize ( ) : void
return void

InputAdapterBase() protected method

Constructs a new instance of the InputAdapterBase.
protected InputAdapterBase ( ) : System
return System

OnConnected() protected method

Called when data input source connection is established.
Derived classes should call this method manually if UseAsyncConnect is true.
protected OnConnected ( ) : void
return void

OnDisconnected() protected method

Called when data input source is disconnected.
Derived classes should call this method manually if UseAsyncConnect is true.
protected OnDisconnected ( ) : void
return void

OnNewMeasurements() protected method

Raises the NewMeasurements event.
protected OnNewMeasurements ( ICollection measurements ) : void
measurements ICollection
return void

OnProcessingComplete() protected method

Raises the ProcessingComplete event.
protected OnProcessingComplete ( ) : void
return void

Start() public method

Starts this InputAdapterBase and initiates connection cycle to data input source.
public Start ( ) : void
return void

Stop() public method

Stops this InputAdapterBase and disconnects from data input source.
public Stop ( ) : void
return void