Skip to content

Dont allow data access above register 65535 for any register type #2

Description

@AlexEshoo

From the wikipedia page for modbus:
coil numbers span from 000001 to 065536,
discrete input numbers span from 100001 to 165536,
input register numbers span from 300001 to 365536,
holding register numbers span from 400001 to 465536.

Therefore the maximum register number accessible (and decodable in uin16) is 65535. This is the highest register that should be allowed by the program to access. The startRegisterSpinBox should allow this value since a poll of data length 1 is valid for that start address, but the program should limit the value in the numberOfRegistersSpinBox to max(65536 - startRegisterSpinBox.value(), 100) to prevent illegal data access.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions