Skip to content

Difficulties migrating from 3.5.2 to 3.8.6: is_active() is_closing() reset_frame() #2602

Closed as not planned
@bsense-rius

Description

@bsense-rius

Dear pymodbus community,

Please, please take this comment constructively. My aim is not to underestimate the great job the developers are putting in this library. And I assume that the comments I am about to make have been largely discussed.

I am an early user since the versions 2.X.X for the Serial Client. I tried to be following each new release as it enhances many features that I greatly appreciate. But it has been hard due to the multiple structure changes, that relocate features, change names, depreacte several functions etc. In fact I stopped trying to update till 3.5.2, because although I made the update to 3.6.4, when running with it from time to time there were port unavailabilities that I could not restore, something that did not happen with 3.5.2. I reported that issue. I understood that it was not possible to fix because there are so many things you are considering! I probably was not too clear to help either.

Anyway, I decided to update the library to the latest stable version 3.8.6, after some plumbing on the imports etc is saw that the ModbusProtocol was dropped from the ModbusBaseClient (inheritance). It formerly was in both server and client, but now it is not present in ModbusBaseClient anymore. I used the functions is_active and is_closing that are still present in ModbusProtocol class.

So my question are, if you are so kind:

  • Which were the reasons to remove the inheritance for ModbusBaseClient?

  • Is there any way for me to restore those features, specially is_active() and is_closing() in ModbusBaseClient (for the AsyncModbusSerialClient)

Finally the reset_frame() function has also vanished. I used it a lot to ensure that before any new command send the buffers were cleared. Otherwise, for down to earth industrial serial devices, in some cases the slave got out of sync (for EMI issues or who knows?) so that the input buffer received that dangling bytes that were added on top of the result of the next call. So by using the reset_frame() all these erroneous bytes were discarded. In the change log reset_frame() is mentioned but not in very explicit way I can understand (sorry for that, probably my bad).

So my questions are, if your are so generous to answer:

  • Which were the reasons to remove the reset_frame() function?
  • Is there any way for me to restore that function to be used AsyncModbusSerialClient

I would be really grateful if any of the greatest developers backing this fantastic library could steal a brief of time to answer the questions, even in a telegraphic way, so that you do not waste your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions