Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Some future release
-
None
Description
Add ExtendedMemory to the enum list of RegisterType in QModbusDataUnit.
The read/write access functions in QModbusServer need additional functions to convert the file number passed on by the requests into offsets +10.000 (i.e. fileNumber = 1 = use address directly, fileNumber = 2 => add 10.000 to the address requested etc.)
That structure allows implementing readFileRecord and writeFileRecord functionality without too much change on QModbusDataUnit at all. The conversion can't be done inside readFileRecord/writeFileRecord because the file numbers are then limited to 7 files (6 files * 10.000 + 7th file = 5536 is the last record).
If the conversion should be handled inside these functions to avoid changing the data access functions (i.e. calculate the address out of addition of file number and reference), the extended memory size limit of the server (64 k words adressable) should be documented.