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

Defines extension functions related to CompactMeasurement.
Показать файл Открыть проект

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

Метод Описание
CompressPayload ( this compactMeasurements, BlockAllocatedMemoryStream destination, byte compressionStrength, bool includeTime, DataPacketFlags &flags ) : bool

Attempts to compress payload of CompactMeasurement values onto the destination stream.

Compressed payload will only be encoded onto destination stream if compressed size would be smaller than normal serialized size.

As an optimization this function uses a compression method that uses pointers to native structures, as such the endian order encoding of the compressed data will always be in the native-endian order of the operating system. This will be an important consideration when writing a endian order neutral payload decompressor. To help with this the actual endian order used during compression is marked in the data flags. However, measurements values are consistently encoded in big-endian order prior to buffer compression.

DecompressPayload ( this source, SignalIndexCache signalIndexCache, int index, int dataLength, int measurementCount, bool includeTime, DataPacketFlags flags ) : GSF.TimeSeries.Transport.CompactMeasurement[]

Decompresses CompactMeasurement values from the given source buffer.

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

CompressPayload() публичный статический Метод

Attempts to compress payload of CompactMeasurement values onto the destination stream.

Compressed payload will only be encoded onto destination stream if compressed size would be smaller than normal serialized size.

As an optimization this function uses a compression method that uses pointers to native structures, as such the endian order encoding of the compressed data will always be in the native-endian order of the operating system. This will be an important consideration when writing a endian order neutral payload decompressor. To help with this the actual endian order used during compression is marked in the data flags. However, measurements values are consistently encoded in big-endian order prior to buffer compression.

public static CompressPayload ( this compactMeasurements, BlockAllocatedMemoryStream destination, byte compressionStrength, bool includeTime, DataPacketFlags &flags ) : bool
compactMeasurements this Payload of values.
destination GSF.IO.BlockAllocatedMemoryStream Memory based stream to hold compressed payload.
compressionStrength byte Compression strength to use.
includeTime bool Flag that determines if time should be included in the compressed payload.
flags DataPacketFlags Current .
Результат bool

DecompressPayload() публичный статический Метод

Decompresses CompactMeasurement values from the given source buffer.
public static DecompressPayload ( this source, SignalIndexCache signalIndexCache, int index, int dataLength, int measurementCount, bool includeTime, DataPacketFlags flags ) : GSF.TimeSeries.Transport.CompactMeasurement[]
source this Buffer with compressed payload.
signalIndexCache SignalIndexCache Current .
index int Index into buffer where compressed payload begins.
dataLength int Length of all data within buffer.
measurementCount int Number of compressed measurements in the payload.
includeTime bool Flag that determines if timestamps as included in the payload.
flags DataPacketFlags Current .
Результат GSF.TimeSeries.Transport.CompactMeasurement[]