C# Class PhasorProtocolAdapters.PhasorDataConcentratorBase

Inheritance: GSF.TimeSeries.Adapters.ActionAdapterBase
Afficher le fichier Open project: GridProtectionAlliance/gsf

Méthodes publiques

Méthode Description
GetHashCode ( ) : int

Returns the hash code for this instance.

Initialize ( ) : void

Initializes PhasorDataConcentratorBase.

QueueMeasurementsForProcessing ( IEnumerable measurements ) : void

Queues a collection of measurements for processing.

ResetLatencyCounters ( ) : void

Resets counters related to latency calculations.

Start ( ) : void

Starts the PhasorDataConcentratorBase, if it is not already running.

Stop ( ) : void

Stops the PhasorDataConcentratorBase.

Méthodes protégées

Méthode Description
AssignMeasurementToFrame ( IFrame frame, IMeasurement measurement ) : void

Assign IMeasurement to its IFrame.

In simple concentration scenarios all you need to do is assign a measurement to its frame based on time. In the case of a phasor data concentrator you need to assign a measurement to its particular location in its IDataFrame - so this method overrides the default behavior in order to accomplish this task.

CacheConfigurationFrame ( IConfigurationFrame configurationFrame, string name ) : void

Serialize configuration frame to cache folder for later use (if needed).

Derived concentrators can call this method to manually serialize their protocol specific configuration frames. Note that after initial call to CreateNewConfigurationFrame this method will be call automatically.

CreateNewConfigurationFrame ( GSF.PhasorProtocols.Anonymous.ConfigurationFrame baseConfigurationFrame ) : IConfigurationFrame

Creates a new protocol specific IConfigurationFrame based on provided protocol independent baseConfigurationFrame.

Derived classes should notify consumers of change in configuration if system is active when new configuration frame is created if outgoing protocol allows such a notification.

DeviceCommandHandler ( System.Guid clientID, string connectionID, byte commandBuffer, int length ) : void

Handles incoming commands from devices connected over the command channel.

This method should be overridden by derived classes in order to handle incoming commands, specifically handling requests for configuration frames.

Dispose ( bool disposing ) : void

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

GetConnectionID ( IServer server, System.Guid clientID ) : string

Gets connection ID (i.e., IP:Port) for specified clientID.

PhasorDataConcentratorBase ( ) : System

Creates a new PhasorDataConcentratorBase.

PublishFrame ( IFrame frame, int index ) : void

Publish IFrame of time-aligned collection of IMeasurement values that arrived within the concentrator's defined ConcentratorBase.LagTime.

Private Methods

Méthode Description
DeviceCommandHandlerProc ( object state ) : void
EstablishPublicationChannel ( ) : void
GeneratePhasorLabel ( string phasorLabel, char phase, PhasorType type ) : string
LookupHostName ( object state ) : void
ReinitializeSocketLayer ( object state ) : void
ResetLifetimeCounters ( ) : void
ResetMeasurementsPerSecondCounters ( ) : void
StartDataChannel ( ) : void
StopDataChannel ( ) : void
UpdateConfiguration ( ) : void
UpdateMeasurementsPerSecond ( int measurementCount ) : void
m_commandChannelRestartTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
m_commandChannel_ClientConnected ( object sender, EventArgs e ) : void
m_commandChannel_ClientConnectingException ( object sender, EventArgs e ) : void
m_commandChannel_ClientDisconnected ( object sender, EventArgs e ) : void
m_commandChannel_ReceiveClientDataComplete ( object sender, EventArgs e ) : void
m_commandChannel_SendClientDataException ( object sender, Exception>.EventArgs e ) : void
m_commandChannel_ServerStarted ( object sender, EventArgs e ) : void
m_commandChannel_ServerStopped ( object sender, EventArgs e ) : void
m_dataChannel_ClientConnectingException ( object sender, EventArgs e ) : void
m_dataChannel_ReceiveClientDataComplete ( object sender, EventArgs e ) : void
m_dataChannel_SendClientDataException ( object sender, Exception>.EventArgs e ) : void
m_dataChannel_ServerStarted ( object sender, EventArgs e ) : void
m_dataChannel_ServerStopped ( object sender, EventArgs e ) : void

Method Details

AssignMeasurementToFrame() protected méthode

Assign IMeasurement to its IFrame.
In simple concentration scenarios all you need to do is assign a measurement to its frame based on time. In the case of a phasor data concentrator you need to assign a measurement to its particular location in its IDataFrame - so this method overrides the default behavior in order to accomplish this task.
protected AssignMeasurementToFrame ( IFrame frame, IMeasurement measurement ) : void
frame IFrame to assign to.
measurement IMeasurement to assign to .
Résultat void

CacheConfigurationFrame() protected méthode

Serialize configuration frame to cache folder for later use (if needed).
Derived concentrators can call this method to manually serialize their protocol specific configuration frames. Note that after initial call to CreateNewConfigurationFrame this method will be call automatically.
protected CacheConfigurationFrame ( IConfigurationFrame configurationFrame, string name ) : void
configurationFrame IConfigurationFrame New to cache.
name string Name to use when caching the .
Résultat void

CreateNewConfigurationFrame() protected abstract méthode

Creates a new protocol specific IConfigurationFrame based on provided protocol independent baseConfigurationFrame.
Derived classes should notify consumers of change in configuration if system is active when new configuration frame is created if outgoing protocol allows such a notification.
protected abstract CreateNewConfigurationFrame ( GSF.PhasorProtocols.Anonymous.ConfigurationFrame baseConfigurationFrame ) : IConfigurationFrame
baseConfigurationFrame GSF.PhasorProtocols.Anonymous.ConfigurationFrame Protocol independent .
Résultat IConfigurationFrame

DeviceCommandHandler() protected méthode

Handles incoming commands from devices connected over the command channel.
This method should be overridden by derived classes in order to handle incoming commands, specifically handling requests for configuration frames.
protected DeviceCommandHandler ( System.Guid clientID, string connectionID, byte commandBuffer, int length ) : void
clientID System.Guid Guid of client that sent the command.
connectionID string Remote client connection identification (i.e., IP:Port).
commandBuffer byte Data buffer received from connected client device.
length int Valid length of data within the buffer.
Résultat void

Dispose() protected méthode

Releases the unmanaged resources used by the PhasorDataConcentratorBase 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.
Résultat void

GetConnectionID() protected méthode

Gets connection ID (i.e., IP:Port) for specified clientID.
protected GetConnectionID ( IServer server, System.Guid clientID ) : string
server IServer Server connection of associated .
clientID System.Guid Guid of client for ID lookup.
Résultat string

GetHashCode() public méthode

Returns the hash code for this instance.
public GetHashCode ( ) : int
Résultat int

Initialize() public méthode

Initializes PhasorDataConcentratorBase.
public Initialize ( ) : void
Résultat void

PhasorDataConcentratorBase() protected méthode

Creates a new PhasorDataConcentratorBase.
protected PhasorDataConcentratorBase ( ) : System
Résultat System

PublishFrame() protected méthode

Publish IFrame of time-aligned collection of IMeasurement values that arrived within the concentrator's defined ConcentratorBase.LagTime.
protected PublishFrame ( IFrame frame, int index ) : void
frame IFrame of measurements with the same timestamp that arrived within that are ready for processing.
index int Index of within a second ranging from zero to - 1.
Résultat void

QueueMeasurementsForProcessing() public méthode

Queues a collection of measurements for processing.
public QueueMeasurementsForProcessing ( IEnumerable measurements ) : void
measurements IEnumerable Collection of measurements to queue for processing.
Résultat void

ResetLatencyCounters() public méthode

Resets counters related to latency calculations.
public ResetLatencyCounters ( ) : void
Résultat void

Start() public méthode

Starts the PhasorDataConcentratorBase, if it is not already running.
public Start ( ) : void
Résultat void

Stop() public méthode

Stops the PhasorDataConcentratorBase.
public Stop ( ) : void
Résultat void