Glen Bakeman
2021-Sep-01 23:40 UTC
[Nut-upsdev] Looking for examples of var TYPE descriptions
Hello, I'm currently trying to understand the implementation of /get_type/ in netget.c, specifically how more complex variable types (such as ENUMs or RANGEs) are represented by text. On my own UPS, it doesn't seem to have anything more complicated than a number or string (or UNKNOWN). It looks like it would be theoretically possible for a var to show as enum OR range AND string OR number, is that true? Thank you in advance, Glen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20210901/c966685d/attachment.htm>
Roger Price
2021-Sep-02 09:50 UTC
[Nut-upsdev] Looking for examples of var TYPE descriptions
On Wed, 1 Sep 2021, Glen Bakeman via Nut-upsdev wrote:> I'm currently trying to understand the implementation of get_type in netget.c, > specifically how more complex variable types (such as ENUMs or RANGEs) are > represented by text. On my own UPS, it doesn't seem to have anything more > complicated than a number or string (or UNKNOWN). > > It looks like it would be theoretically possible for a var to show as enum OR > range AND string OR number, is that true?Have a look at section 4.2.4 GET at http://rogerprice.org/NUT/draft-rprice-ups-management-protocol-05.html#name-get-2 Roger