Skip to content

How to implement a custom server that can be busy? #2620

Closed as not planned
Closed as not planned
@shyd

Description

@shyd

Hi,
in my project, I have custom contexts that communicate with external hardware. Therefore I derive from ModbusSparseDataBlock and overwrite validate, setValues and getValues with my business logic.

For example I have a coil that takes several seconds to process data on the external hardware. A response look like this even the device is busy.

WriteSingleCoilResponse(dev_id=1, transaction_id=1, address=6, count=0, bits=[True], registers=[], status=1)

Now my question is how to use busy flag that the client gets the according response that the device is currently busy? If I use a lock the response would timeout because the lock cannot be acquired in time.

Thank you very much for this project!

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