-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repl enhancements 2 #1141
Repl enhancements 2 #1141
Conversation
I am hoping to make 3.0.1 around November 5, does that give you enough time to merge this ? If not I will pospone the release a bit. |
The CI error might be mine, will look at it Monday. |
Ok, I will poke around a bit tomorrow to see if I can fix it. |
Don’t’t worry as you can see it is a temporary error, restarting the job cures the problem. |
* `data_len`: Length of the stray_data (`int`) | ||
* `clear_after`: Clears the error responses after <n> requests (`int`) | ||
|
||
**EXAMPLES** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot for adding this example section. Super useful
self._min_register_value = min_register_value | ||
self._max_register_value = max_register_value | ||
|
||
def getValues(self, fc_as_hex, address, count=1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this functionality work for single bit object types? I was thinking about coils.
Not sure if is really much value, but for my own tests that would be nice, although the complexity of randomise booleans is much less.
Anyhow, just wondering about your thoughts about those objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holding registers and coils can be overridden and hence they are excluded from simulation. Bit fields should be straight forward (0 or 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right that makes sense
@janiversen I may not be able to finish writing the test cases for this PR by first week of November, Please feel free to drop this from the next release if you think having tests are a must. You can merge otherwise and I will add tests in future. |
Thanks for the heads up. I still have a couple of days work on the new datastore (adding tests), once done I will merge this one and make the release. As you say test can come later. |
I will merge this now, because I am testing/pre-building doc and sources to see what more we need, please make the tests in a new PR. |
--random
inpymodbus.server
to randomize values read fordiscrete inputs
andinput registers
Example invocation
The values for simulation can also be passed as a json file to
--modbus-config
param , for e.g to limit the max and min values a register should have. Referdata_block_settings
in the below json file.TODO