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

An encoder for the TSSC protocol.
Afficher le fichier Open project: GridProtectionAlliance/gsf Class Usage Examples

Méthodes publiques

Méthode Description
FinishBlock ( ) : int

Finishes the current block and returns position after the last byte written.

Reset ( ) : void

Resets the TSSC Encoder 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 write data to.

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

Adds the supplied measurement to the stream. If the stream is full, this method returns false.

TsscEncoder ( ) : System

Creates a encoder for the TSSC protocol.

Private Methods

Méthode Description
BitStreamEnd ( ) : void
BitStreamFlush ( ) : void
ClearBitStream ( ) : void

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

WriteBits ( int code, int len ) : void
WritePointIdChange ( ushort id ) : void
WriteQualityChange ( uint quality, TsscPointMetadata point ) : void
WriteTimestampChange ( long timestamp ) : void

Method Details

FinishBlock() public méthode

Finishes the current block and returns position after the last byte written.
public FinishBlock ( ) : int
Résultat int

Reset() public méthode

Resets the TSSC Encoder 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
Résultat void

SetBuffer() public méthode

Sets the internal buffer to write data to.
public SetBuffer ( byte data, int startingPosition, int length ) : void
data byte
startingPosition int
length int
Résultat void

TryAddMeasurement() public méthode

Adds the supplied measurement to the stream. If the stream is full, this method returns false.
public TryAddMeasurement ( 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
Résultat bool

TsscEncoder() public méthode

Creates a encoder for the TSSC protocol.
public TsscEncoder ( ) : System
Résultat System