Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Unify config options for apc_modbus and other Modbus drivers (at least) #2419

Open
jimklimov opened this issue Apr 26, 2024 · 0 comments
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

Comments

@jimklimov
Copy link
Member

jimklimov commented Apr 26, 2024

During work on #2294 I've noticed that apc_modbus, generic_modbus.c and adelsystem_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 relevant strtol() parsers involved.

@jimklimov jimklimov added refactor/fightwarn PR or issue proposal to improve code maintainability without functional changes, or to fix warnings modbus impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) labels Apr 26, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant