FluentModbus
FluentModbus copied to clipboard
Add method to return Span<bool> for coils, etc
Via https://stackoverflow.com/a/61367679 I found that C# has (quite a while actually) the bitarray class.
If you update the documentation so we get
var coils = client.ReadCoils(1, 0x8000, 255);
var bits = new BitArray(coils.ToArray());
The coils array will be converted to an bitarray by C#
Thank you, I will consider it for the next update!