C# 클래스 GSF.TimeSeries.Transport.TSSC.TsscEncoder

An encoder for the TSSC protocol.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
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

메소드 상세

FinishBlock() 공개 메소드

Finishes the current block and returns position after the last byte written.
public FinishBlock ( ) : int
리턴 int

Reset() 공개 메소드

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
리턴 void

SetBuffer() 공개 메소드

Sets the internal buffer to write data to.
public SetBuffer ( byte data, int startingPosition, int length ) : void
data byte
startingPosition int
length int
리턴 void

TryAddMeasurement() 공개 메소드

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
리턴 bool

TsscEncoder() 공개 메소드

Creates a encoder for the TSSC protocol.
public TsscEncoder ( ) : System
리턴 System