C# 클래스 GSF.TimeSeries.Transport.CompactMeasurement

Represents a IMeasurement that can be serialized with minimal size.
This measurement implementation is serialized through ISupportBinaryImage to allow complete control of binary format. Only critical measurements properties are serialized and every attempt is made to optimize the binary image for purposes of size reduction.
상속: Measurement, IBinaryMeasurement
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

공개 메소드들

메소드 설명
CompactMeasurement ( IMeasurement measurement, SignalIndexCache signalIndexCache, bool includeTime = true, long baseTimeOffsets = null, int timeIndex, bool useMillisecondResolution = false ) : System

Creates a new CompactMeasurement from an existing IMeasurement value.

CompactMeasurement ( SignalIndexCache signalIndexCache, bool includeTime = true, long baseTimeOffsets = null, int timeIndex, bool useMillisecondResolution = false ) : System

Creates a new CompactMeasurement.

GenerateBinaryImage ( byte buffer, int startIndex ) : int

Generates binary image of the CompactMeasurement and copies it into the given buffer, for ISupportBinaryImage.BinaryLength bytes.

Field: Bytes:
-------- -------
Flags 1
ID 2
Value 4
[Time] 2?

Constant Length = 7
Variable Length = 0, 2, 4 or 8 (i.e., total size is 7, 9, 11 or 15)

ParseBinaryImage ( byte buffer, int startIndex, int length ) : int

Initializes CompactMeasurement from the specified binary image.

메소드 상세

CompactMeasurement() 공개 메소드

Creates a new CompactMeasurement from an existing IMeasurement value.
public CompactMeasurement ( IMeasurement measurement, SignalIndexCache signalIndexCache, bool includeTime = true, long baseTimeOffsets = null, int timeIndex, bool useMillisecondResolution = false ) : System
measurement IMeasurement Source value.
signalIndexCache SignalIndexCache Signal index cache used to serialize or deserialize runtime information.
includeTime bool Set to true to include time in serialized packet; otherwise false.
baseTimeOffsets long Base time offset array - set to null to use full fidelity measurement time.
timeIndex int Time index to use for base offset.
useMillisecondResolution bool Flag that determines if millisecond resolution is in use for this serialization.
리턴 System

CompactMeasurement() 공개 메소드

Creates a new CompactMeasurement.
public CompactMeasurement ( SignalIndexCache signalIndexCache, bool includeTime = true, long baseTimeOffsets = null, int timeIndex, bool useMillisecondResolution = false ) : System
signalIndexCache SignalIndexCache Signal index cache used to serialize or deserialize runtime information.
includeTime bool Set to true to include time in serialized packet; otherwise false.
baseTimeOffsets long Base time offset array - set to null to use full fidelity measurement time.
timeIndex int Time index to use for base offset.
useMillisecondResolution bool Flag that determines if millisecond resolution is in use for this serialization.
리턴 System

GenerateBinaryImage() 공개 메소드

Generates binary image of the CompactMeasurement and copies it into the given buffer, for ISupportBinaryImage.BinaryLength bytes.

Field: Bytes:
-------- -------
Flags 1
ID 2
Value 4
[Time] 2?

Constant Length = 7
Variable Length = 0, 2, 4 or 8 (i.e., total size is 7, 9, 11 or 15)

is null. /// or is less than 0 -or- /// and will exceed length. ///
public GenerateBinaryImage ( byte buffer, int startIndex ) : int
buffer byte Buffer used to hold generated binary image of the source object.
startIndex int 0-based starting index in the to start writing.
리턴 int

ParseBinaryImage() 공개 메소드

Initializes CompactMeasurement from the specified binary image.
Not enough buffer available to deserialize measurement. is null. /// or is less than 0 -or- /// and will exceed length. ///
public ParseBinaryImage ( byte buffer, int startIndex, int length ) : int
buffer byte Buffer containing binary image to parse.
startIndex int 0-based starting index in the to start parsing.
length int Valid number of bytes within from .
리턴 int