hoggyhoggy / givenergy-modbus-async

A python library to access GivEnergy inverters via Modbus TCP on a local network, with no dependency on the GivEnergy Cloud.
Other
1 stars 2 forks source link

remove async from framer #11

Closed divenal closed 2 months ago

divenal commented 2 months ago

There doesn't seem any good reason for the framer to be async. It just takes a byte array, and carves it into individual messages. It doesn't do any i/o and it simply returns the messages, without itself doing anything with them.

Having it asynchronous precludes using it in any synchronous tools (which are much easier to debug with). But making it synchronous does not preclude using it in an async context.