Elio, you flagged 'ups.delay.{shutdown,reboot}' as 'ST_FLAG_RW' (and
set their maximum length with dstate_setaux()): is the user really
expected to be able to change those vars? If not, don't bother with
flags or length; otherwise, you should also provide a 'upsh.setvar'.

Also, if those vars are actually writable, I would suggest to:
- if they are always numeric and if possible, flag them as
'ST_FLAG_NUMBER' (or, at least, not as 'ST_FLAG_STRING'),
- set their boundaries, if known, with dstate_addenum() or, if
appropriate, with dstate_addrange(),
- if they don't set values in the device, but only in NUT, add (and
document in riello_{ser,usb} man pages) corresponding options to be
set in ups.conf (or using the `-x var=value` command line option),
since the driver, when launched with the `-k` flag or through
`upsdrvctl shutdown`, cannot be aware of any 'transient' change made
previously.

See http://new.networkupstools.org/docs/developer-guide.chunked/ar01s04.html
ยง4.14-4.17

Lastly, since you are already on GitHub, feel free to open a pull
request there for any proposed change.

_______________________________________________
Nut-upsdev mailing list
Nut-upsdev@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to