Click or drag to resize

MultiProtocolFrameParser Class

Protocol independent frame parser.
Inheritance Hierarchy
SystemObject
  GSF.PhasorProtocolsMultiProtocolFrameParser

Namespace: GSF.PhasorProtocols
Assembly: GSF.PhasorProtocols (in GSF.PhasorProtocols.dll) Version: 2.4.205-beta
Syntax
public sealed class MultiProtocolFrameParser : IFrameParser, 
	IProvideStatus, IDisposable
View Source

The MultiProtocolFrameParser type exposes the following members.

Constructors
 NameDescription
Public methodMultiProtocolFrameParser Creates a new MultiProtocolFrameParser using the default settings.
Top
Properties
 NameDescription
Public propertyAllowedParsingExceptions Gets or sets number of parsing exceptions allowed during ParsingExceptionWindow before connection is reset. Defaults to DefaultAllowedParsingExceptions.
Public propertyAutoRepeatCapturedPlayback Gets or sets a flag that determines if a file used for replaying data should be restarted at the beginning once it has been completed.
Public propertyAutoStartDataParsingSequence Gets or sets flag to automatically send the ConfigFrame2 and EnableRealTimeData command frames used to start a typical data parsing sequence. Defaults to DefaultAutoStartDataParsingSequence.
Public propertyBitRate Gets the calculated bit rate (i.e., bits per second (bps)) based on data received from device connection.
Public propertyBufferSize Gets or sets the size of the buffer used by the MultiProtocolFrameParser for sending and receiving data from a device.
Public propertyByteRate Gets the calculated byte rate (i.e., bytes per second) based on data received from device connection.
Public propertyCalculatedFrameRate Gets the calculated frame rate (i.e., frames per second) based on data received from device connection.
Public propertyCheckSumValidationFrameTypes Gets or sets flags that determine if check-sums for specified frames should be validated.
Public propertyCommandChannelServerUri Gets the server URI of the command channel connection, or null if not connected.
Public propertyConfigurationFrame Gets or sets current IConfigurationFrame used for parsing IDataFrame's encountered in the data stream from a device.
Public propertyConfigurationFrameVersion Gets or sets specific configuration frame version to request from device which overrides default that otherwise requests latest configuration frame version for current protocol.
Public propertyConfiguredFrameRate Gets the configured frame rate as reported by the connected device.
Public propertyConnectionInfo Gets a string representing connectivity information.
Public propertyConnectionIsListener Gets flag that determines if the connection type is a TCP server.
Public propertyConnectionIsMulticast Gets flag that determines if the connection type is multicast.
Public propertyConnectionParameters Gets or sets any connection specific IConnectionParameters that may be applicable for the current PhasorProtocol.
Public propertyConnectionString Gets or sets the key/value pair based connection information required by the MultiProtocolFrameParser to connect to a device.
Public propertyConnectionTime Gets total time connection has been active.
Public propertyConnectionType Gets the connection type (Active, Passive or Hybrid) based on defined channels and transport selections.
Public propertyDataChannelIsServerBased Gets a boolean value that determines if data channel is defined as a server based connection.
Public propertyDataChannelServerUri Gets the server URI of the data channel connection, or null if not connected.
Public propertyDefinedFrameRate Gets or sets desired frame rate to use for maintaining captured frame replay timing. Defaults to DefaultDefinedFrameRate.
Public propertyDeviceID Gets or sets the device identification code often needed to establish a connection.
Public propertyDeviceSupportsCommands Gets or sets flag that determines if a device supports commands.
Public propertyDisableRealTimeDataOnStop Gets or sets flag to disable real-time data on stop. Defaults to DefaultDisableRealTimeDataOnStop.
Public propertyDisconnectAtEOF Gets or sets flag that determines if client should disconnect when end of file has been reached.
Public propertyEnabled Gets or sets a boolean value that indicates whether the MultiProtocolFrameParser is currently enabled.
Public propertyInjectSimulatedTimestamp Gets or sets flag indicating whether or not to inject local system time into parsed data frames.
Public propertyIsConnected Gets a flag that determines if the currently selected TransportProtocol is connected.
Public propertyIsIEEEProtocol Gets a flag that determines if the currently selected PhasorProtocol is an IEEE standard protocol.
Public propertyKeepCommandChannelOpen Gets or sets flag that determines whether to keep the command channel open after the initial startup sequence. Defaults to DefaultKeepCommandChannelOpen.
Public propertyMaximumConnectionAttempts Gets or sets the maximum number of times the MultiProtocolFrameParser will attempt to connect to a device. Defaults to DefaultMaximumConnectionAttempts.
Public propertyMegaBitRate Gets the calculated megabits per second (Mbps) rate based on data received from device connection.
Public propertyName Gets a descriptive name for a device connection that includes SourceName, if provided.
Public propertyParsingExceptionWindow Gets or sets time duration, in Ticks, to monitor parsing exceptions. Defaults to DefaultParsingExceptionWindow.
Public propertyPhasorProtocol Gets or sets PhasorProtocol to use with this MultiProtocolFrameParser.
Public propertyQueuedBuffers Gets the total number of buffers that are currently queued for processing, if any.
Public propertyQueuedOutputs Gets the total number of frames that are currently queued for publication, if any.
Public propertyRedundantFramesPerPacket Gets the number of redundant frames in each packet.
Public propertyReplayStartTime Gets or sets the replay start time to use for file based input. File read will begin when encountered frame timestamps are greater than or equal to specified ReplayStartTime.
Public propertyReplayStopTime Gets or sets the replay stop time to use for file based input. File read will end when encountered frame timestamps are greater than or equal to specified ReplayStopTime.
Public propertyServerIndex Gets the current server index, when multiple server end points are defined.
Public propertySkipDisableRealTimeData Gets or sets flag to skip automatic disabling of the real-time data stream on shutdown or startup. Defaults to DefaultSkipDisableRealTimeData.
Public propertySourceName Gets or sets a descriptive name for a device connection.
Public propertyStatus Gets current descriptive status of the MultiProtocolFrameParser.
Public propertyTotalBytesReceived Gets total number of bytes that have been received from a device so far.
Public propertyTotalCrcExceptions Gets total number of CRC exceptions encountered from device so far.
Public propertyTotalFramesReceived Gets total number of frames that have been received from a device so far.
Public propertyTotalMissingFrames Gets total number of frames that were missing from device so far.
Public propertyTransportProtocol Gets or sets TransportProtocol to use with this MultiProtocolFrameParser.
Public propertyTrustHeaderLength Gets or sets flag that determines if header lengths should be trusted over parsed byte count. Defaults to DefaultTrustHeaderLength.
Public propertyUseHighResolutionInputTimer Gets or sets flag that determines if a high-resolution precision timer should be used for file based input.
Top
Methods
 NameDescription
Public methodDispose Releases all the resources used by the MultiProtocolFrameParser object.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Releases the unmanaged resources before the MultiProtocolFrameParser object is reclaimed by GC.
(Overrides ObjectFinalize)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodRequestNextServerIndex Requests that the client attempt to move to the next ServerIndex.
Public methodResetTotalBytesReceived Resets the value for the TotalBytesReceived statistic.
Public methodSendDeviceCommand(DeviceCommand) Sends the specified DeviceCommand to the remote device.
Public methodSendDeviceCommand(ICommandFrame) Sends the specified ICommandFrame to the remote device.
Public methodSendRawDeviceCommand Sends the specified raw command to the remote device.
Public methodStart Starts the MultiProtocolFrameParser.
Public methodStop Stops the MultiProtocolFrameParser.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryInitializeFrameParser Attempts to initialize the protocol specific frame parser.
Public methodWrite Writes data directly to the frame parsing engine buffer.
Top
Events
 NameDescription
Public eventBufferParsed Occurs when buffer parsing has completed.
Public eventConfigurationChanged Occurs when a device sends a notification that its configuration has changed.
Public eventConnectionAttempt Occurs when MultiProtocolFrameParser is attempting connection to a device.
Public eventConnectionEstablished Occurs when MultiProtocolFrameParser has established a connection to a device.
Public eventConnectionException Occurs when an Exception is encountered during connection attempt to a device.
Public eventConnectionTerminated Occurs when device connection has been terminated.
Public eventExceededParsingExceptionThreshold Occurs when number of parsing exceptions exceed AllowedParsingExceptions during ParsingExceptionWindow.
Public eventParsingException Occurs when an Exception is encountered while parsing the data stream.
Public eventReceivedChannelFrame Occurs when any IChannelFrame has been received.
Public eventReceivedCommandFrame Occurs when a ICommandFrame has been received.
Public eventReceivedConfigurationFrame Occurs when a IConfigurationFrame has been received.
Public eventReceivedDataFrame Occurs when a IDataFrame has been received.
Public eventReceivedFrameBufferImage Occurs when a frame buffer image has been received.
Public eventReceivedFrameImage Occurs when a frame image has been received.
Public eventReceivedHeaderFrame Occurs when a IHeaderFrame has been received.
Public eventReceivedUndeterminedFrame Occurs when an undetermined IChannelFrame has been received.
Public eventSentCommandFrame Occurs when a ICommandFrame is sent to a device.
Public eventServerIndexUpdated Occurs when the ServerIndex of the associated connection is updated.
Public eventServerStarted Occurs when the MultiProtocolFrameParser is setup as a listening connection and server connection has been started.
Public eventServerStopped Occurs when the MultiProtocolFrameParser is setup as a listening connection and server connection has been stopped.
Top
Fields
 NameDescription
Public fieldStatic memberDefaultAllowedParsingExceptions Specifies the default value for the AllowedParsingExceptions property.
Public fieldStatic memberDefaultAutoStartDataParsingSequence Specifies the default value for the AutoStartDataParsingSequence property.
Public fieldStatic memberDefaultBufferSize Specifies the default value for the BufferSize property.
Public fieldStatic memberDefaultDefinedFrameRate Specifies the default value for the DefinedFrameRate property.
Public fieldStatic memberDefaultDisableRealTimeDataOnStop Specifies the default value for the DisableRealTimeDataOnStop property.
Public fieldStatic memberDefaultKeepCommandChannelOpen Specifies the default value for the KeepCommandChannelOpen property.
Public fieldStatic memberDefaultMaximumConnectionAttempts Specifies the default value for the MaximumConnectionAttempts property.
Public fieldStatic memberDefaultParsingExceptionWindow Specifies the default value for the ParsingExceptionWindow property.
Public fieldStatic memberDefaultSkipDisableRealTimeData Specifies the default value for the SkipDisableRealTimeData property.
Public fieldStatic memberDefaultTrustHeaderLength Specifies the default value for the TrustHeaderLength property.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This class takes all protocol frame parsing implementations and reduces them to a single simple-to-use class exposing all data through abstract interfaces (e.g., IConfigurationFrame, IDataFrame, etc.) - this way new protocol implementations can be added without adversely affecting consuming code. Additionally, this class implements a variety of transport options (e.g., TCP, UDP, Serial, etc.) and hides the complexities of this connectivity and internally pushes all data received from the selected transport protocol to the selected phasor parsing protocol.
See Also