MultiProtocolFrameParser Class

Protocol independent frame parser.

Definition

Namespace: Gemstone.PhasorProtocols
Assembly: Gemstone.PhasorProtocols (in Gemstone.PhasorProtocols.dll) Version: 1.0.128 -- Release Build+dd7f32701ba80de4d5b0557e84e0ddc18a34573f
public sealed class MultiProtocolFrameParser : IFrameParser, 
	IProvideStatus, IDisposable
Inheritance
Object    MultiProtocolFrameParser
Implements
IProvideStatus, IFrameParser, IDisposable

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.

Constructors

MultiProtocolFrameParser Creates a new MultiProtocolFrameParser using the default settings.

Properties

AllowedParsingExceptions Gets or sets number of parsing exceptions allowed during ParsingExceptionWindow before connection is reset. Defaults to DefaultAllowedParsingExceptions.
AutoRepeatCapturedPlayback 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.
AutoStartDataParsingSequence Gets or sets flag to automatically send the ConfigFrame2 and EnableRealTimeData command frames used to start a typical data parsing sequence. Defaults to DefaultAutoStartDataParsingSequence.
BitRate Gets the calculated bit rate (i.e., bits per second (bps)) based on data received from device connection.
BufferSize Gets or sets the size of the buffer used by the MultiProtocolFrameParser for sending and receiving data from a device.
ByteRate Gets the calculated byte rate (i.e., bytes per second) based on data received from device connection.
CalculatedFrameRate Gets the calculated frame rate (i.e., frames per second) based on data received from device connection.
CheckSumValidationFrameTypes Gets or sets flags that determine if check-sums for specified frames should be validated.
CommandChannelServerUri Gets the server URI of the command channel connection, or null if not connected.
ConfigurationFrame Gets or sets current IConfigurationFrame used for parsing IDataFrame's encountered in the data stream from a device.
ConfigurationFrameVersion Gets or sets specific configuration frame version to request from device which overrides default that otherwise requests latest configuration frame version for current protocol.
ConfiguredFrameRate Gets the configured frame rate as reported by the connected device.
ConnectionInfo Gets a string representing connectivity information.
ConnectionIsListener Gets flag that determines if the connection type is a TCP server.
ConnectionIsMulticast Gets flag that determines if the connection type is multicast.
ConnectionParameters Gets or sets any connection specific IConnectionParameters that may be applicable for the current PhasorProtocol.
ConnectionString Gets or sets the key/value pair based connection information required by the MultiProtocolFrameParser to connect to a device.
ConnectionTime Gets total time connection has been active.
ConnectionType Gets the connection type (Active, Passive or Hybrid) based on defined channels and transport selections.
DataChannelIsServerBased Gets a boolean value that determines if data channel is defined as a server based connection.
DataChannelServerUri Gets the server URI of the data channel connection, or null if not connected.
DefinedFrameRate Gets or sets desired frame rate to use for maintaining captured frame replay timing. Defaults to DefaultDefinedFrameRate.
DeviceID Gets or sets the device identification code often needed to establish a connection.
DeviceSupportsCommands Gets or sets flag that determines if a device supports commands.
DisableRealTimeDataOnStop Gets or sets flag to disable real-time data on stop. Defaults to DefaultDisableRealTimeDataOnStop.
DisconnectAtEOF Gets or sets flag that determines if client should disconnect when end of file has been reached.
Enabled Gets or sets a boolean value that indicates whether the MultiProtocolFrameParser is currently enabled.
InjectSimulatedTimestamp Gets or sets flag indicating whether or not to inject local system time into parsed data frames.
IsConnected Gets a flag that determines if the currently selected TransportProtocol is connected.
IsIEEEProtocol Gets a flag that determines if the currently selected PhasorProtocol is an IEEE standard protocol.
KeepCommandChannelOpen Gets or sets flag that determines whether to keep the command channel open after the initial startup sequence. Defaults to DefaultKeepCommandChannelOpen.
MaximumConnectionAttempts Gets or sets the maximum number of times the MultiProtocolFrameParser will attempt to connect to a device. Defaults to DefaultMaximumConnectionAttempts.
MegaBitRate Gets the calculated megabits per second (Mbps) rate based on data received from device connection.
Name Gets a descriptive name for a device connection that includes SourceName, if provided.
ParsingExceptionWindow Gets or sets time duration, in Ticks, to monitor parsing exceptions. Defaults to DefaultParsingExceptionWindow.
PhasorProtocol Gets or sets PhasorProtocol to use with this MultiProtocolFrameParser.
QueuedBuffers Gets the total number of buffers that are currently queued for processing, if any.
QueuedOutputs Gets the total number of frames that are currently queued for publication, if any.
RedundantFramesPerPacket Gets the number of redundant frames in each packet.
ReplayStartTime 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.
ReplayStopTime 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.
ServerIndex Gets the current server index, when multiple server end points are defined.
SkipDisableRealTimeData Gets or sets flag to skip automatic disabling of the real-time data stream on shutdown or startup. Defaults to DefaultSkipDisableRealTimeData.
SourceName Gets or sets a descriptive name for a device connection.
Status Gets current descriptive status of the MultiProtocolFrameParser.
TotalBytesReceived Gets total number of bytes that have been received from a device so far.
TotalCrcExceptions Gets total number of CRC exceptions encountered from device so far.
TotalFramesReceived Gets total number of frames that have been received from a device so far.
TotalMissingFrames Gets total number of frames that were missing from device so far.
TransportProtocol Gets or sets TransportProtocol to use with this MultiProtocolFrameParser.
TrustHeaderLength Gets or sets flag that determines if header lengths should be trusted over parsed byte count. Defaults to DefaultTrustHeaderLength.
UseHighResolutionInputTimer Gets or sets flag that determines if a high-resolution precision timer should be used for file based input.

Methods

Dispose Releases all the resources used by the MultiProtocolFrameParser object.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Releases the unmanaged resources before the MultiProtocolFrameParser object is reclaimed by GC.
(Overrides ObjectFinalize)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
RequestNextServerIndex Requests that the client attempt to move to the next ServerIndex.
ResetTotalBytesReceived Resets the value for the TotalBytesReceived statistic.
SendDeviceCommand(DeviceCommand) Sends the specified DeviceCommand to the remote device.
SendDeviceCommand(ICommandFrame) Sends the specified ICommandFrame to the remote device.
SendRawDeviceCommand Sends the specified raw command to the remote device.
Start Starts the MultiProtocolFrameParser.
Stop Stops the MultiProtocolFrameParser.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryInitializeFrameParser Attempts to initialize the protocol specific frame parser.
Write Writes data directly to the frame parsing engine buffer.

Events

BufferParsed Occurs when buffer parsing has completed.
ConfigurationChanged Occurs when a device sends a notification that its configuration has changed.
ConnectionAttempt Occurs when MultiProtocolFrameParser is attempting connection to a device.
ConnectionEstablished Occurs when MultiProtocolFrameParser has established a connection to a device.
ConnectionException Occurs when an Exception is encountered during connection attempt to a device.
ConnectionTerminated Occurs when device connection has been terminated.
ExceededParsingExceptionThreshold Occurs when number of parsing exceptions exceed AllowedParsingExceptions during ParsingExceptionWindow.
ParsingException Occurs when an Exception is encountered while parsing the data stream.
ReceivedChannelFrame Occurs when any IChannelFrame has been received.
ReceivedCommandFrame Occurs when a ICommandFrame has been received.
ReceivedConfigurationFrame Occurs when a IConfigurationFrame has been received.
ReceivedDataFrame Occurs when a IDataFrame has been received.
ReceivedFrameBufferImage Occurs when a frame buffer image has been received.
ReceivedFrameImage Occurs when a frame image has been received.
ReceivedHeaderFrame Occurs when a IHeaderFrame has been received.
ReceivedUndeterminedFrame Occurs when an undetermined IChannelFrame has been received.
SentCommandFrame Occurs when a ICommandFrame is sent to a device.
ServerIndexUpdated Occurs when the ServerIndex of the associated connection is updated.
ServerStarted Occurs when the MultiProtocolFrameParser is setup as a listening connection and server connection has been started.
ServerStopped Occurs when the MultiProtocolFrameParser is setup as a listening connection and server connection has been stopped.

Fields

DefaultAllowedParsingExceptions Specifies the default value for the AllowedParsingExceptions property.
DefaultAutoStartDataParsingSequence Specifies the default value for the AutoStartDataParsingSequence property.
DefaultBufferSize Specifies the default value for the BufferSize property.
DefaultDefinedFrameRate Specifies the default value for the DefinedFrameRate property.
DefaultDisableRealTimeDataOnStop Specifies the default value for the DisableRealTimeDataOnStop property.
DefaultKeepCommandChannelOpen Specifies the default value for the KeepCommandChannelOpen property.
DefaultMaximumConnectionAttempts Specifies the default value for the MaximumConnectionAttempts property.
DefaultParsingExceptionWindow Specifies the default value for the ParsingExceptionWindow property.
DefaultSkipDisableRealTimeData Specifies the default value for the SkipDisableRealTimeData property.
DefaultTrustHeaderLength Specifies the default value for the TrustHeaderLength property.

See Also