C# Класс GSF.TimeSeries.Transport.TSSC.TsscDecoder

The decoder for the TSSC protocol.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ClearBitStream void
DecodePointID void
DecodeQuality uint
DecodeTimestamp long
ReadBit int
ReadBits4 int
ReadBits5 int

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Reset() публичный Метод

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
Результат void

SetBuffer() публичный Метод

Sets the internal buffer to read data from.
public SetBuffer ( byte data, int startingPosition, int length ) : void
data byte
startingPosition int
length int
Результат void

TryGetMeasurement() публичный Метод

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
Результат bool

TsscDecoder() публичный Метод

Creates a decoder for the TSSC protocol.
public TsscDecoder ( ) : System
Результат System