Skip to content

Commit

Permalink
Merge pull request #2715 from jimklimov/issue-2692-nhs-ser-refactor
Browse files Browse the repository at this point in the history
Refactor `nhs_ser` driver
  • Loading branch information
jimklimov authored Dec 12, 2024
2 parents 1bfbe5e + fb4b88c commit 5a67745
Show file tree
Hide file tree
Showing 3 changed files with 720 additions and 506 deletions.
10 changes: 9 additions & 1 deletion docs/new-drivers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ and it doesn't appear to be connected, display an error and exit. This
is the last time your driver is allowed to bail out.

This is usually a good place to create variables like `ups.mfr`,
`ups.model`, `ups.serial`, and other "one time only" items.
`ups.model`, `ups.serial`, determine and declare supported instant
commands (maybe model-dependent, typically for all devices supported
by the driver), and other "one time only" items.

upsdrv_updateinfo
~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -740,6 +742,12 @@ If your hardware and driver can support a command, register it.

dstate_addcmd("load.on");

Don't forget to define the implementation for such commands in a common
method, and register that your driver has an instant command handler at
all -- with a line in `upsdrv_initinfo()` like:

upsh.instcmd = blazer_instcmd;

Delays and ser_* functions
--------------------------

Expand Down
3 changes: 2 additions & 1 deletion docs/nut-names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ Valid SPECs

NOTE: For cursory readers -- the following couple of tables lists just the
short `SPEC` component of the larger `DOMAIN.CONTEXT.SPEC` naming scheme
for phase-aware values, as discussed in other sections of this chapter.
for phase-aware values, as discussed in other sections of this chapter just
above. These are NOT to be used verbatim as complete data-point names!

Valid with/without context (i.e. per phase or aggregated/averaged)

Expand Down
Loading

0 comments on commit 5a67745

Please sign in to comment.