C# Класс GSF.TimeSeries.Transport.SerializableMeasurement

Represents a IMeasurement that can be serialized.
This measurement implementation is serialized through ISupportBinaryImage to allow complete control of binary format. All measurement properties are serialized at their full resolution and no attempt is made to optimize the binary image for purposes of size reduction.
Наследование: Measurement, IBinaryMeasurement
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GenerateBinaryImage ( byte buffer, int startIndex ) : int

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

Field: Bytes:
--------- ---------
Key ID 4
SourceLen 4
Source SourceLen
Signal ID 16
TagLen 4
Tag TagLen
Value 8
Adder 8
Multiplier 8
Ticks 8
Flags 4

Constant Length = 64
Variable Length = SourceLen + TagLen

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

Initializes SerializableMeasurement from the specified binary image.

SerializableMeasurement ( Encoding encoding ) : System

Creates a new SerializableMeasurement.

SerializableMeasurement ( IMeasurement measurement, Encoding encoding ) : System

Creates a new SerializableMeasurement from an existing IMeasurement value.

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

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

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

Field: Bytes:
--------- ---------
Key ID 4
SourceLen 4
Source SourceLen
Signal ID 16
TagLen 4
Tag TagLen
Value 8
Adder 8
Multiplier 8
Ticks 8
Flags 4

Constant Length = 64
Variable Length = SourceLen + TagLen

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 SerializableMeasurement 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

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

Creates a new SerializableMeasurement.
public SerializableMeasurement ( Encoding encoding ) : System
encoding System.Text.Encoding Character encoding used to convert strings to binary.
Результат System

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

Creates a new SerializableMeasurement from an existing IMeasurement value.
public SerializableMeasurement ( IMeasurement measurement, Encoding encoding ) : System
measurement IMeasurement Source value.
encoding System.Text.Encoding Character encoding used to convert strings to binary.
Результат System