C# 클래스 GSF.TimeSeries.Transport.DataSubscriber

상속: GSF.TimeSeries.Adapters.InputAdapterBase
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DataSubscriber_ConnectionAuthenticated void
DataSubscriber_MetaDataReceived void
DeserializeMetadata System.Data.DataSet
DeserializeSignalIndexCache SignalIndexCache
DisconnectClient void
FixExpectedMeasurementCounts void
FromLocallySynchronizedInfo GSF.TimeSeries.Transport.UnsynchronizedSubscriptionInfo
GetAuthorizedSignalIDs System.Guid[]
GetCharacterEncoding System.Text.Encoding
GetDataGapRecoverySubscriptionStatus string
GetFramesPerSecond int
GetLocalCertificate string
GetUnauthorizedSignalIDs System.Guid[]
HandleDeviceStatisticsRegistration void
HandleSocketException bool
InitSyncProgress void
IsUserCommand bool
LocallySynchronizedSubscribe bool
OnExceededParsingExceptionThreshold void
ParseTSSCMeasurements void
ProcessServerResponse void
RefreshMetadata void
RegisterDeviceStatistics void
RemoteCertificateExists bool
RemotelySynchronizedSubscribe bool
ResetLifetimeCounters void
ResetMeasurementsPerSecondCounters void
Restart void
StartSubscription void
SubscribeToOutputMeasurements void
SubscribedDevicesTimer_Elapsed void
SynchronizedMetadataChanged bool
TryFilterOutputMeasurements void
UnregisterDeviceStatistics void
UnsynchronizedSubscribe bool
UpdateMeasurementsPerSecond void
UpdateOutputMeasurements bool
UpdateStatisticsHelpers void
UpdateSyncProgress void
m_commandChannel_ConnectionAttempt void
m_commandChannel_ConnectionEstablished void
m_commandChannel_ConnectionException void
m_commandChannel_ConnectionTerminated void
m_commandChannel_ReceiveData void
m_commandChannel_ReceiveDataException void
m_commandChannel_SendDataException void
m_dataChannel_ConnectionAttempt void
m_dataChannel_ConnectionException void
m_dataChannel_ReceiveData void
m_dataChannel_ReceiveDataException void
m_dataGapRecoverer_ProcessException void
m_dataGapRecoverer_RecoveredMeasurements void
m_dataGapRecoverer_StatusMessage void
m_dataStreamMonitor_Elapsed void
m_localConcentrator_ProcessException void
m_runTimeLog_ProcessException void

공개 메소드들

메소드 설명
Authenticate ( string sharedSecret, string authenticationID ) : bool

Authenticates subscriber to a data publisher.

DataSubscriber ( ) : System

Creates a new DataSubscriber.

GetShortStatus ( int maxLength ) : string

Gets a short one-line status of this DataSubscriber.

Initialize ( ) : void

Initializes DataSubscriber.

SendServerCommand ( ServerCommand commandCode, byte data = null ) : bool

Sends a server command to the publisher connection.

SendServerCommand ( ServerCommand commandCode, string message ) : bool

Sends a server command to the publisher connection with associated message data.

Subscribe ( GSF.TimeSeries.Transport.SubscriptionInfo info ) : bool

Subscribes (or re-subscribes) to a data publisher for a set of data points.

Subscribe ( bool remotelySynchronized, bool compactFormat, string connectionString ) : bool

Subscribes (or re-subscribes) to a data publisher for a set of data points.

SynchronizeMetadata ( DataSet metadata ) : void

Spawn meta-data synchronization.

This method makes sure only one meta-data synchronization happens at a time.

SynchronizedSubscribe ( GSF.TimeSeries.Transport.SynchronizedSubscriptionInfo info ) : bool

Subscribes (or re-subscribes) to a data publisher for a synchronized set of data points.

Unsubscribe ( ) : bool

Unsubscribes from a data publisher.

UnsynchronizedSubscribe ( GSF.TimeSeries.Transport.UnsynchronizedSubscriptionInfo info ) : bool

Subscribes (or re-subscribes) to a data publisher for an unsynchronized set of data points.

보호된 메소드들

메소드 설명
AttemptConnection ( ) : void

Attempts to connect to this DataSubscriber.

AttemptDisconnection ( ) : void

Attempts to disconnect from this DataSubscriber.

Dispose ( bool disposing ) : void

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

DisposeLocalConcentrator ( ) : void

Disposes of any previously defined local concentrator.

GetLoggingPath ( string filePath ) : string

Gets file path for any defined logging path.

InterpretResponseMessage ( byte buffer, int startIndex, int length ) : string

Get message from string based response.

OnConnectionAuthenticated ( ) : void

Raises the ConnectionAuthenticated event.

OnConnectionEstablished ( ) : void

Raises the ConnectionEstablished event.

OnConnectionTerminated ( ) : void

Raises the ConnectionTerminated event.

OnDataStartTime ( Ticks startTime ) : void

Raises the DataStartTime event.

OnMetaDataReceived ( DataSet metadata ) : void

Raises the MetaDataReceived event.

OnNotificationReceived ( string message ) : void

Raises the NotificationReceived event.

OnProcessException ( MessageLevel level, Exception exception, string eventName = null, MessageFlags flags = MessageFlags.None ) : void

Raises AdapterBase.ProcessException event.

OnProcessingComplete ( string source ) : void

Raises the ProcessingComplete event.

OnReceivedServerResponse ( ServerResponse responseCode, ServerCommand commandCode ) : void

Raises the ReceivedServerResponse event.

OnReceivedUserCommandResponse ( ServerCommand command, ServerResponse response, byte buffer, int startIndex, int length ) : void

Raises the ReceivedUserCommandResponse event.

OnServerConfigurationChanged ( ) : void

Raises the ServerConfigurationChanged event.

SynchronizeMetadata ( ) : void

Handles meta-data synchronization to local system.

This function should only be initiated from call to SynchronizeMetadata(DataSet) to make sure only one meta-data synchronization happens at once. Users can override this method to customize process of meta-data synchronization.

비공개 메소드들

메소드 설명
DataSubscriber_ConnectionAuthenticated ( object sender, EventArgs e ) : void
DataSubscriber_MetaDataReceived ( object sender, EventArgs e ) : void
DeserializeMetadata ( byte buffer ) : DataSet
DeserializeSignalIndexCache ( byte buffer ) : SignalIndexCache
DisconnectClient ( ) : void
FixExpectedMeasurementCounts ( ) : void
FromLocallySynchronizedInfo ( GSF.TimeSeries.Transport.SynchronizedSubscriptionInfo info ) : GSF.TimeSeries.Transport.UnsynchronizedSubscriptionInfo
GetAuthorizedSignalIDs ( ) : System.Guid[]
GetCharacterEncoding ( OperationalEncoding operationalEncoding ) : Encoding
GetDataGapRecoverySubscriptionStatus ( ) : string
GetFramesPerSecond ( DataTable measurementTable, System.Guid signalID ) : int
GetLocalCertificate ( ) : string
GetUnauthorizedSignalIDs ( ) : System.Guid[]
HandleDeviceStatisticsRegistration ( ) : void
HandleSocketException ( Exception ex ) : bool
InitSyncProgress ( long totalActions ) : void
IsUserCommand ( ServerCommand command ) : bool
LocallySynchronizedSubscribe ( bool compactFormat, int framesPerSecond, double lagTime, double leadTime, string filterExpression, string dataChannel = null, bool useLocalClockAsRealTime = false, bool ignoreBadTimestamps = false, bool allowSortsByArrival = true, long timeResolution = Ticks.PerMillisecond, bool allowPreemptivePublishing = true, DownsamplingMethod downsamplingMethod = DownsamplingMethod.LastReceived, string startTime = null, string stopTime = null, string constraintParameters = null, int processingInterval = -1, string waitHandleNames = null, int waitHandleTimeout ) : bool
OnExceededParsingExceptionThreshold ( ) : void

Raises the ExceededParsingExceptionThreshold event.

ParseTSSCMeasurements ( byte buffer, int responseLength, int &responseIndex, List measurements ) : void
ProcessServerResponse ( byte buffer, int length ) : void
RefreshMetadata ( ) : void
RegisterDeviceStatistics ( ) : void
RemoteCertificateExists ( ) : bool
RemotelySynchronizedSubscribe ( bool compactFormat, int framesPerSecond, double lagTime, double leadTime, string filterExpression, string dataChannel = null, bool useLocalClockAsRealTime = false, bool ignoreBadTimestamps = false, bool allowSortsByArrival = true, long timeResolution = Ticks.PerMillisecond, bool allowPreemptivePublishing = true, DownsamplingMethod downsamplingMethod = DownsamplingMethod.LastReceived, string startTime = null, string stopTime = null, string constraintParameters = null, int processingInterval = -1, string waitHandleNames = null, int waitHandleTimeout ) : bool
ResetLifetimeCounters ( ) : void
ResetMeasurementsPerSecondCounters ( ) : void
Restart ( ) : void
StartSubscription ( ) : void
SubscribeToOutputMeasurements ( bool metaDataRefreshCompleted ) : void
SubscribedDevicesTimer_Elapsed ( object sender, EventArgs elapsedEventArgs ) : void
SynchronizedMetadataChanged ( DataSet newSynchronizedMetadata ) : bool
TryFilterOutputMeasurements ( ) : void
UnregisterDeviceStatistics ( ) : void
UnsynchronizedSubscribe ( bool compactFormat, bool throttled, string filterExpression, string dataChannel = null, bool includeTime = true, double lagTime = 10.0D, double leadTime = 5.0D, bool useLocalClockAsRealTime = false, string startTime = null, string stopTime = null, string constraintParameters = null, int processingInterval = -1, string waitHandleNames = null, int waitHandleTimeout ) : bool
UpdateMeasurementsPerSecond ( System.DateTime now, int measurementCount ) : void
UpdateOutputMeasurements ( bool initialCall = false ) : bool
UpdateStatisticsHelpers ( ) : void
UpdateSyncProgress ( ) : void
m_commandChannel_ConnectionAttempt ( object sender, EventArgs e ) : void
m_commandChannel_ConnectionEstablished ( object sender, EventArgs e ) : void
m_commandChannel_ConnectionException ( object sender, EventArgs e ) : void
m_commandChannel_ConnectionTerminated ( object sender, EventArgs e ) : void
m_commandChannel_ReceiveData ( object sender, EventArgs e ) : void
m_commandChannel_ReceiveDataException ( object sender, EventArgs e ) : void
m_commandChannel_SendDataException ( object sender, EventArgs e ) : void
m_dataChannel_ConnectionAttempt ( object sender, EventArgs e ) : void
m_dataChannel_ConnectionException ( object sender, EventArgs e ) : void
m_dataChannel_ReceiveData ( object sender, EventArgs e ) : void
m_dataChannel_ReceiveDataException ( object sender, EventArgs e ) : void
m_dataGapRecoverer_ProcessException ( object sender, EventArgs e ) : void
m_dataGapRecoverer_RecoveredMeasurements ( object sender, EventArgs e ) : void
m_dataGapRecoverer_StatusMessage ( object sender, EventArgs e ) : void
m_dataStreamMonitor_Elapsed ( object sender, EventArgs e ) : void
m_localConcentrator_ProcessException ( object sender, EventArgs e ) : void
m_runTimeLog_ProcessException ( object sender, EventArgs e ) : void

메소드 상세

AttemptConnection() 보호된 메소드

Attempts to connect to this DataSubscriber.
protected AttemptConnection ( ) : void
리턴 void

AttemptDisconnection() 보호된 메소드

Attempts to disconnect from this DataSubscriber.
protected AttemptDisconnection ( ) : void
리턴 void

Authenticate() 공개 메소드

Authenticates subscriber to a data publisher.
public Authenticate ( string sharedSecret, string authenticationID ) : bool
sharedSecret string Shared secret used to look up private crypto key and initialization vector.
authenticationID string Authentication ID that publisher will use to validate subscriber identity.
리턴 bool

DataSubscriber() 공개 메소드

Creates a new DataSubscriber.
public DataSubscriber ( ) : System
리턴 System

Dispose() 보호된 메소드

Releases the unmanaged resources used by the DataSubscriber 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.
리턴 void

DisposeLocalConcentrator() 보호된 메소드

Disposes of any previously defined local concentrator.
protected DisposeLocalConcentrator ( ) : void
리턴 void

GetLoggingPath() 보호된 메소드

Gets file path for any defined logging path.
protected GetLoggingPath ( string filePath ) : string
filePath string Path to acquire within logging path.
리턴 string

GetShortStatus() 공개 메소드

Gets a short one-line status of this DataSubscriber.
public GetShortStatus ( int maxLength ) : string
maxLength int Maximum length of the status message.
리턴 string

Initialize() 공개 메소드

Initializes DataSubscriber.
public Initialize ( ) : void
리턴 void

InterpretResponseMessage() 보호된 메소드

Get message from string based response.
protected InterpretResponseMessage ( byte buffer, int startIndex, int length ) : string
buffer byte Response buffer.
startIndex int Start index of response message.
length int Length of response message.
리턴 string

OnConnectionAuthenticated() 보호된 메소드

Raises the ConnectionAuthenticated event.
protected OnConnectionAuthenticated ( ) : void
리턴 void

OnConnectionEstablished() 보호된 메소드

Raises the ConnectionEstablished event.
protected OnConnectionEstablished ( ) : void
리턴 void

OnConnectionTerminated() 보호된 메소드

Raises the ConnectionTerminated event.
protected OnConnectionTerminated ( ) : void
리턴 void

OnDataStartTime() 보호된 메소드

Raises the DataStartTime event.
protected OnDataStartTime ( Ticks startTime ) : void
startTime Ticks Start time, in , of first measurement transmitted.
리턴 void

OnMetaDataReceived() 보호된 메소드

Raises the MetaDataReceived event.
protected OnMetaDataReceived ( DataSet metadata ) : void
metadata System.Data.DataSet Meta-data instance to send to client subscription.
리턴 void

OnNotificationReceived() 보호된 메소드

Raises the NotificationReceived event.
protected OnNotificationReceived ( string message ) : void
message string Message for the notification.
리턴 void

OnProcessException() 보호된 메소드

Raises AdapterBase.ProcessException event.
protected OnProcessException ( MessageLevel level, Exception exception, string eventName = null, MessageFlags flags = MessageFlags.None ) : void
level MessageLevel The to assign to this message
exception System.Exception Processing .
eventName string A fixed string to classify this event; defaults to null.
flags MessageFlags to use, if any; defaults to .
리턴 void

OnProcessingComplete() 보호된 메소드

Raises the ProcessingComplete event.
protected OnProcessingComplete ( string source ) : void
source string Type name of adapter that sent the processing completed notification.
리턴 void

OnReceivedServerResponse() 보호된 메소드

Raises the ReceivedServerResponse event.
protected OnReceivedServerResponse ( ServerResponse responseCode, ServerCommand commandCode ) : void
responseCode ServerResponse Response received from the server.
commandCode ServerCommand Command that the server responded to.
리턴 void

OnReceivedUserCommandResponse() 보호된 메소드

Raises the ReceivedUserCommandResponse event.
protected OnReceivedUserCommandResponse ( ServerCommand command, ServerResponse response, byte buffer, int startIndex, int length ) : void
command ServerCommand The code for the user command.
response ServerResponse The code for the server's response.
buffer byte Buffer containing the message from the server.
startIndex int Index into the buffer used to skip the header.
length int The length of the message in the buffer, including the header.
리턴 void

OnServerConfigurationChanged() 보호된 메소드

Raises the ServerConfigurationChanged event.
protected OnServerConfigurationChanged ( ) : void
리턴 void

SendServerCommand() 공개 메소드

Sends a server command to the publisher connection.
public SendServerCommand ( ServerCommand commandCode, byte data = null ) : bool
commandCode ServerCommand to send.
data byte Optional command data to send.
리턴 bool

SendServerCommand() 공개 메소드

Sends a server command to the publisher connection with associated message data.
public SendServerCommand ( ServerCommand commandCode, string message ) : bool
commandCode ServerCommand to send.
message string String based command data to send to server.
리턴 bool

Subscribe() 공개 메소드

Subscribes (or re-subscribes) to a data publisher for a set of data points.
public Subscribe ( GSF.TimeSeries.Transport.SubscriptionInfo info ) : bool
info GSF.TimeSeries.Transport.SubscriptionInfo Configuration object that defines the subscription.
리턴 bool

Subscribe() 공개 메소드

Subscribes (or re-subscribes) to a data publisher for a set of data points.
public Subscribe ( bool remotelySynchronized, bool compactFormat, string connectionString ) : bool
remotelySynchronized bool Boolean value that determines if subscription should be remotely synchronized - note that data publisher may not allow remote synchronization.
compactFormat bool Boolean value that determines if the compact measurement format should be used. Set to false for full fidelity measurement serialization; otherwise set to true for bandwidth conservation.
connectionString string Connection string that defines required and optional parameters for the subscription.
리턴 bool

SynchronizeMetadata() 보호된 메소드

Handles meta-data synchronization to local system.
This function should only be initiated from call to SynchronizeMetadata(DataSet) to make sure only one meta-data synchronization happens at once. Users can override this method to customize process of meta-data synchronization.
protected SynchronizeMetadata ( ) : void
리턴 void

SynchronizeMetadata() 공개 메소드

Spawn meta-data synchronization.
This method makes sure only one meta-data synchronization happens at a time.
public SynchronizeMetadata ( DataSet metadata ) : void
metadata System.Data.DataSet to use for synchronization.
리턴 void

SynchronizedSubscribe() 공개 메소드

Subscribes (or re-subscribes) to a data publisher for a synchronized set of data points.
public SynchronizedSubscribe ( GSF.TimeSeries.Transport.SynchronizedSubscriptionInfo info ) : bool
info GSF.TimeSeries.Transport.SynchronizedSubscriptionInfo Configuration object that defines the subscription.
리턴 bool

Unsubscribe() 공개 메소드

Unsubscribes from a data publisher.
public Unsubscribe ( ) : bool
리턴 bool

UnsynchronizedSubscribe() 공개 메소드

Subscribes (or re-subscribes) to a data publisher for an unsynchronized set of data points.
public UnsynchronizedSubscribe ( GSF.TimeSeries.Transport.UnsynchronizedSubscriptionInfo info ) : bool
info GSF.TimeSeries.Transport.UnsynchronizedSubscriptionInfo Configuration object that defines the subscription.
리턴 bool