Interface IDeviceBinaryFieldFormatter<T>
Converts one binary field of type T to and from a fixed number of bytes.
public interface IDeviceBinaryFieldFormatter<T>
Type Parameters
T
- Extension Methods
Properties
Size
Gets how many bytes the field takes.
int Size { get; }
Property Value
Methods
Read(ReadOnlySpan<byte>, bool)
Reads the value from exactly Size bytes.
T Read(ReadOnlySpan<byte> source, bool bigEndian)
Parameters
sourceReadOnlySpan<byte>bigEndianbool
Returns
- T
Write(T, Span<byte>, bool)
Writes the value into exactly Size bytes.
void Write(T value, Span<byte> destination, bool bigEndian)