Hi Karl,

Thanks for your feedback!

> While unifying the code that handles this is good, you're keeping
> the term "address" but switching it's implementation to "register
> number".

Actually I don't modify the behaviour of the decoder. Both address and
number were there before.
The annotation looked like this before: "Start at address 0x0000 / 30001'"
The pattern is: "Start at address <address-in-hex> / <number-in-dec>'"
I've just moved address-to-number conversion into a function, which is
used for all function decoders.
This made conversion consistent across all function decoders (some of
them had offset 30000, some 30001)
and fixed ranges for input and holding registers. They were swapped.

> I would suggest either
> a) leaving the address terms, and therefore leaving them as zero
> based, or b) changing the terminology to register number.
>
> Personally, I would prefer option (a) but as long as it's
> consistent...

Register addresses and numbers exist in parallel and are used interchangeably.
Actual packets on UART level have addresses in them, but manuals for
MODBUS devices list both register addresses
and register numbers. So I think it is beneficial to have both of them
in annotations.

> Further, using the "ranged" notation 3xxxx and 4xxxxx it's
> expected to see them in decimal, not hex, but that was an
> existing quirk, really, you've just kept it here.

Ranged notation (register number) is decimal, but address is in hex.
E.g.: "Start at address 0xE0 / 30225"
The change doesn't alter annotations from the user point of view.

Best regards,
Maksim Salau


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to