aramperes / nut-rs

rups: A Network UPS Tools (NUT) implementation in Rust.

Home Page:https://crates.io/crates/rups

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support `GET TYPE`

aramperes opened this issue · comments

https://networkupstools.org/docs/developer-guide.chunked/ar01s09.html

Form:
	GET TYPE <upsname> <varname>
	GET TYPE su700 input.transfer.low

Response:
	TYPE <upsname> <varname> <type>...
	TYPE su700 input.transfer.low ENUM

<type> can be several values, and multiple words may be returned:

	RW: this variable may be set to another value with SET
	ENUM: an enumerated type, which supports a few specific values
	STRING:n: this is a string of maximum length n
	RANGE: this is an numeric, either integer or float, comprised in the range (see LIST RANGE)
	NUMBER: this is a simple numeric value, either integer or float

ENUM, STRING and RANGE are usually associated with RW, but not always. The default <type>, when omitted, is numeric, so either integer or float. Each driver is then responsible for handling values as either integer or float.

Note that float values are expressed using decimal (base 10) english-based representation, so using a dot, in non-scientific notation. So hexadecimal, exponents, and comma for thousands separator are forbidden. For example: "1200.20" is valid, while "1,200.20" and "1200,20" are invalid.