[Nut-upsuser] Discontinuous output of a LIST RANGE command ?

Roger Price roger at rogerprice.org
Sun Jun 20 14:59:00 BST 2021

On Sat, 19 Jun 2021, Charles Lepple via Nut-upsuser wrote:

> On Jun 19, 2021, at 10:55 AM, Roger Price wrote:
>> The Developer Guide Chapter 9 https://networkupstools.org/docs/developer-guide.chunked/ar01s09.html "Network Protocol Information" provides the following example of the output of a LIST RANGE command:
>> BEGIN LIST RANGE su700 input.transfer.low
>> RANGE su700 input.transfer.low "90" "100"
>> RANGE su700 input.transfer.low "102" "105"
>> ...
>> END LIST RANGE su700 input.transfer.low
>> The RANGE entries are not contiguous. There is a gap between "100" and "102". Is this correct?
> Unfortunately, I don't think we have an example of the full set of data for 
> the su700 UPS mentioned there. The only use of this in recent history seems to 
> be in nutdrv_qx (search for dstate_addrange()).
> The way I read the protocol document, though, the gap seems intentional. 
> Otherwise, a single range from 90 to 105 could have been used. I suspect this 
> was intended for cases where the low voltage is relative to a 110/220V setting 
> (e.g. you can't set the low voltage to be something in the middle like 150V). 
> I admit this sounds contrived; however, the NUT code seems to support multiple 
> discontinuous ranges as shown in that example.
> Here is a real-world example of a single range per variable:
> https://github.com/networkupstools/nut-ddl/blob/master/INELT/INELT__Monolith_E1000LT-12V__nutdrv-qx__2.7.4__01.dev#L72
> This would probably yield:
> BEGIN LIST RANGE inelt input.transfer.low
> RANGE inelt input.transfer.low "40" "47"
> END LIST RANGE inelt input.transfer.low

Since one would generally expect a single range, I will reduce the example in 
the I-D to a single range for a fictional UPS-1, even though the code can do 
more.  NUT will still conform to the future RFC.


More information about the Nut-upsuser mailing list