Refactor: Unify config options for apc_modbus
and other Modbus drivers (at least)
#2419
Labels
documentation
impacts-release-2.8.2
Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)
modbus
refactor/fightwarn
PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Milestone
During work on #2294 I've noticed that
apc_modbus
,generic_modbus.c
andadelsystem_cbi.c
share several variables with different names for same concepts, notably for Serial-port RTU.It may be wise to de-duplicate these (and also check if other drivers with serial port capability have their own names). Updated drivers should support old names for backwards-compatibility (and maybe warn that they are obsoleted - maybe a new variant of
addvar()
can be useful here) but not expose in help/docs.Note also the documentation aspect in e.g. #2422 - that many options are specifically 10-based numbers, while others are guess-based (can be prefixed with
0x
for base-16), see the last option in relevantstrtol()
parsers involved.The text was updated successfully, but these errors were encountered: