Interface IDeviceBinaryChecksum

Namespace
ProtoTest.Devices
Assembly
ProtoTest.Devices.dll

A checksum a binary message carries after its body, such as Modbus RTU's CRC-16.

public interface IDeviceBinaryChecksum
Extension Methods

Properties

Size

Gets how many bytes the checksum takes.

int Size { get; }

Property Value

int

Methods

Compute(ReadOnlySpan<byte>, Span<byte>)

Computes the checksum of body (every byte before it) into destination.

void Compute(ReadOnlySpan<byte> body, Span<byte> destination)

Parameters

body ReadOnlySpan<byte>
destination Span<byte>