Class DeviceFormatters.Bcd
A whole number in packed BCD, two digits per byte, most significant first: with 3 bytes,
12345 is 01 23 45. Byte order does not apply.
public abstract class DeviceFormatters.Bcd : IDeviceBinaryFieldFormatter<long>
- Inheritance
-
DeviceFormatters.Bcd
- Implements
- Inherited Members
- Extension Methods
Constructors
Bcd(int)
A whole number in packed BCD, two digits per byte, most significant first: with 3 bytes,
12345 is 01 23 45. Byte order does not apply.
protected Bcd(int bytes)
Parameters
bytesint
Properties
Size
Gets how many bytes the field takes.
public int Size { get; }
Property Value
Methods
Read(ReadOnlySpan<byte>, bool)
Reads the value from exactly Size bytes.
public long Read(ReadOnlySpan<byte> source, bool bigEndian)
Parameters
sourceReadOnlySpan<byte>bigEndianbool
Returns
Write(long, Span<byte>, bool)
Writes the value into exactly Size bytes.
public void Write(long value, Span<byte> destination, bool bigEndian)