C# Class 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.
Inheritance: Measurement, IBinaryMeasurement
Afficher le fichier Open project: GridProtectionAlliance/gsf Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

GenerateBinaryImage() public méthode

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.
Résultat int

ParseBinaryImage() public méthode

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 .
Résultat int

SerializableMeasurement() public méthode

Creates a new SerializableMeasurement.
public SerializableMeasurement ( Encoding encoding ) : System
encoding System.Text.Encoding Character encoding used to convert strings to binary.
Résultat System

SerializableMeasurement() public méthode

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.
Résultat System