Add simulator actions for WriteMultipleRegistersRequest and WriteMultipleCoilsRequest #2157
Replies: 1 comment 2 replies
-
WriteMultipleCoilsRequest / WriteMultipleRegistersRequest do call context.setValues (in line 230 and 216), why would it call context.getValues() the response do not need the before values (like in the mask call). A more correct approach would be to expand actions to be called in setValues() as well, that of course would require a parameter change to the action call, e.g. adding the function code. pull requests are always welcome, if you want something to work differently. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a requirement to define custom actions for
WriteMultipleRegistersRequest
andWriteMultipleCoilsRequest
. This is for testing the Modbus client on a new hardware project.To the best of my understanding, simulator actions (custom or built-in) for writes to the simulator server seem to only be performed for
WriteSingleCoilRequest
andWriteSingleRegisterRequest
, and notWriteMultipleRegistersRequest
andWriteMultipleCoilsRequest
.I can see there is no call to
context.getValues()
in theWriteMultipleRegistersRequest
andWriteMultipleCoilsRequest
execute()
methods, because it is not strictly required to process the request. Adding this call would allow the actions to be executed.Is there any appetite for adding this functionality? Am I looking in the right area? I am working in the dev branch.
Beta Was this translation helpful? Give feedback.
All reactions