In some of the examples I've seen e.g:
assert(rq.function_code < 0x80)
Is this the canonical way to check if a response is an error or not? If so, what's the best way to pinpoint what kind of error it was? Check the exception_code against ModbusExceptions?
Note sure how the API could be improved, but would be nice if there were some more examples of error handling in the examples (which are great!).