C# Class GSF.TimeSeries.Transport.TSSC.TsscDecoder

The decoder for the TSSC protocol.
Mostrar archivo Open project: GridProtectionAlliance/gsf Class Usage Examples

Private Properties

Property Type Description
ClearBitStream void
DecodePointID void
DecodeQuality uint
DecodeTimestamp long
ReadBit int
ReadBits4 int
ReadBits5 int

Public Methods

Method Description
Reset ( ) : void

Resets the TSSC Decoder to the initial state.

TSSC is a stateful encoder that requires a state of the previous data to be maintained. Therefore, if the state ever becomes corrupt (out of order, dropped, corrupted, or duplicated) the state must be reset on both ends.

SetBuffer ( byte data, int startingPosition, int length ) : void

Sets the internal buffer to read data from.

TryGetMeasurement ( ushort &id, long &timestamp, uint &quality, float &value ) : bool

Reads the next measurement from the stream. If the end of the stream has been encountered, return false.

TsscDecoder ( ) : System

Creates a decoder for the TSSC protocol.

Private Methods

Method Description
ClearBitStream ( ) : void

Resets the stream so it can be reused. All measurements must be registered again.

DecodePointID ( int code, TsscPointMetadata lastPoint ) : void
DecodeQuality ( int code, TsscPointMetadata nextPoint ) : uint
DecodeTimestamp ( int code ) : long
ReadBit ( ) : int
ReadBits4 ( ) : int
ReadBits5 ( ) : int

Method Details

Reset() public method

Resets the TSSC Decoder to the initial state.
TSSC is a stateful encoder that requires a state of the previous data to be maintained. Therefore, if the state ever becomes corrupt (out of order, dropped, corrupted, or duplicated) the state must be reset on both ends.
public Reset ( ) : void
return void

SetBuffer() public method

Sets the internal buffer to read data from.
public SetBuffer ( byte data, int startingPosition, int length ) : void
data byte
startingPosition int
length int
return void

TryGetMeasurement() public method

Reads the next measurement from the stream. If the end of the stream has been encountered, return false.
public TryGetMeasurement ( ushort &id, long &timestamp, uint &quality, float &value ) : bool
id ushort the id
timestamp long the timestamp in ticks
quality uint the quality
value float the value
return bool

TsscDecoder() public method

Creates a decoder for the TSSC protocol.
public TsscDecoder ( ) : System
return System