WIP: adjust modbus sync logic and implement connection manager#2262
Open
alext-extracellular wants to merge 14 commits intofrangoteam:masterfrom
Open
WIP: adjust modbus sync logic and implement connection manager#2262alext-extracellular wants to merge 14 commits intofrangoteam:masterfrom
alext-extracellular wants to merge 14 commits intofrangoteam:masterfrom
Conversation
Author
|
tabs have been replaced by spaces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
A similar PR to this one: #2200
However I have implemented a different approach for synchronising with modbus devices. Instead of using a queue or sending the commands whenever the UI is used, the UI only modifies a local version of the state, which is then synchronised to the remote devices on the configured polling interval. This reduces the chance of timeout errors, and also means that a delay cannot build up between FUXA and the device on the other end of the queue. In this case, the delay between an action in FUXA and an update on the remote device will always be equal to the polling interval. It allows for setting higher polling frequencies with less chance of errors, as there are no user input triggered commands that can get sent at the same time and overload the bus.
To support multiple server devices on one RTU or TCP device, a connection manager has been added, which will create a key and shared connection that any other devices will reuse. this is the default behaviour now when no "Socket Reuse" option is selected.
I will mark as WIP for now, as I want to run some more tests in the coming week on my own hardware, but initial tests have succeeded and provided better performance.
🧪 Type of Change
Please mark the relevant option:
🚫 Build Artifacts Check
Please confirm:
/client/dist🔍 Checklist
📝 Additional Notes