Replies: 3 comments 4 replies
-
if datablocks is created with TotalRegs=10, isn't that supposed to limit it to those 10 registers and return illegal address if any registers outside that range are requested?
|
Beta Was this translation helpful? Give feedback.
-
I am not sure that is the proper response, where in the standard did you read that! IllegalAddress should only be returned if the parameter address is illegal not the count. |
Beta Was this translation helpful? Give feedback.
-
You will find that real life devices respond very differently, but if you want the datastore to behave differently then pull requests are welcome. |
Beta Was this translation helpful? Give feedback.
-
if I only create 10 holding registers, my client can request say 50, and the first 10 register will have the proper values, and the rest are zeros. The proper operation would be to return Illegal address 0x02 if any register outside the range of the 10 defined was requested.
They shouldn't have access to undefined registers.
What is the best way to enforce this?
Update: I see it created 65535 regs by default. So I guess h_regs_size would do the trick. Let me try.
Beta Was this translation helpful? Give feedback.
All reactions