-
-
Notifications
You must be signed in to change notification settings - Fork 351
New generation drivers
Charles Lepple edited this page Feb 4, 2015
·
4 revisions
- Runtime architecture approaches
2 options:
-
nutdrv_main (loader) + libnutdrv_<device_protocol> + libnutcomm_<communication_protocol>
- pros => minimize footprints, allow max. reuse, allow multiple communication interfaces (classic nut, snmp, ampq), use symlink (?)
- cons => use libltdl; fewer optimization opportunities with shared libraries; will require more extensive testing than incremental changes
-
classic (current) style monolithic (static) compilation
- pros => classic, known, no libltdl,
- cons => not flexible, doesn't allow other communication interfaces (classic nut, snmp, ampq),
- Binaries naming convention
Drivers (or driver libraries) will follow the (lib)nutdrv_* naming
- (lib)nutdrv_skel
- (lib)nutdrv_repeater
- (lib)nutdrv_simu[lator]
- (lib)nutdrv_snmp
- (lib)nutdrv_modbus
- (lib)nutdrv_usbhid
- ...
Cons: ps
defaults to narrow columns for process names
- address generic driver with
- a generic engine
- external mapping file, to ease adding new mapping and modifying existing ones, while not overloading the driver nor having to recompile it,
- thread-safe code in libs, and main.cpp loader / "empty shell" (using symlinks...),
- but threads don't mix well with hardware
- callbacks with real interface (not void/void))
Welcome to the Network UPS Tools (NUT) project Wiki, and feel free to contribute tricks and insights.
While there are several good entries in the menu, ones referenced most frequently in issue discussions include:
- Building NUT for in-place upgrades or non-disruptive tests and Using NIT (NUT Integration Test suite) sandbox
- Technicalities: Customizing (NUT) config files and scripts delivered by packaging
- Links to distribution packaging recipes and repository sections
- Troubleshooting
upsdrvctl
drivers not starting ("insufficient permissions on everything" or "Can't claim USB device [VVVV:PPPP]@0/0: Entity not found") possibly due to nut-driver-enumerator (NDE) services having been there before you with NUT 2.8.x - Changing NUT daemon debug verbosity
- Building NUT integration for Home Assistant
- Running NUT in an LXC container
- Troubleshooting eventual disconnections (Data stale) and CyberPower Systems (CPS) know-how
- NUT for Windows
- NUT HCL and DDL
- Code contributions, PRs, PGP and DCO
- NUT CI farm
Also keep in mind the documentation links from NUT website and the FAQ in particular.