Apollo3zehn / FluentModbus

Lightweight and fast client and server implementation of the Modbus protocol (TCP/RTU).
MIT License
189 stars 71 forks source link

Make use of BinaryPrimitives #54

Open Apollo3zehn opened 2 years ago

Apollo3zehn commented 2 years ago

https://github.com/dotnet/corefx/pull/24400

aviatrix commented 2 years ago

I've tried to implement this, but there was issue where there's no switch from endianness on span/memory, just on primitive types. So, we might have to remove switching endianness on span/memory or leave it as is

https://github.com/Apollo3zehn/FluentModbus/blob/39d819d7258fbaa48f73966b1a06e25a042361af/src/FluentModbus/ModbusUtils.cs#L161-L178

Apollo3zehn commented 2 years ago

That's good to know, thanks :-) I'll leave this issue open as a reminder to completely review the server/client API to work with different byte layouts.