FluentModbus icon indicating copy to clipboard operation
FluentModbus copied to clipboard

Add method to return Span<bool> for coils, etc

Open Apollo3zehn opened this issue 5 years ago • 2 comments

Apollo3zehn avatar May 10 '19 20:05 Apollo3zehn

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#

the-programmer avatar Apr 05 '22 13:04 the-programmer

Thank you, I will consider it for the next update!

Apollo3zehn avatar Apr 06 '22 15:04 Apollo3zehn