C# Класс Lawo.EmberPlusSharp.S101.MessageDecodingStream

Transparently decodes a single S101 message.

At construction, a Message object is first decoded from the ReadBuffer object passed to CreateAsync and made available through the Message property. Afterwards, a call to any of the Read methods of this stream removes data from ReadBuffer object passed to the CreateAsync. The data is then decoded and the decoded form is then returned.

If a message contains multiple packets, their payload is automatically joined such that it can be read through this stream as if the message consisted of only one packet.

Наследование: NonSeekableStream
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CreateAsync Task
MessageDecodingStream System
ReadDeframedAsync Task
ReadFromCurrentPacketAsync Task
ValidateMessage void

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

Метод Описание
DisposeAsync ( CancellationToken cancellationToken ) : Task
ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task

Приватные методы

Метод Описание
CreateAsync ( ReadBuffer rawBuffer, byte discardBuffer, Action outOfFrameByteReceived, CancellationToken cancellationToken ) : Task
MessageDecodingStream ( ReadBuffer rawBuffer, byte discardBuffer, Action outOfFrameByteReceived ) : System
ReadDeframedAsync ( byte buffer, int index, int count, CancellationToken cancellationToken ) : Task
ReadFromCurrentPacketAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
ValidateMessage ( S101Message newMessage ) : void

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

DisposeAsync() публичный закрытый Метод

public final DisposeAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Результат Task

ReadAsync() публичный закрытый Метод

public final ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
Результат Task