-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netget/upsrw: display the type (STRING | NUMBER) beside ENUM and RANGE #267
Comments
I'm gonna commit the following (note that NUMBER values are also displayed): before:[ambient.temperature.low] [battery.date] [test.number] [ups.start.auto] After:[ambient.temperature.low] [battery.date] [test.number] [ups.start.auto] |
Beside from the existing ST_FLAG_STRING, a need has arise to have an explicit type NUMBER, and thus a flag for this type, can be used generally, and more specifically with the driver primitive dstate_setflags() Reference: #267
Allow the drivers to explicitly use ST_FLAG_NUMBER through dstate_setflags() Reference: #267
Ranges, added through dstate_addrange(), only support numeric ranges. So automatically add the ST_FLAG_NUMBER flag to range Reference: #267
ENUM can be either NUMBER or STRING, which was previously not published. Reference: #267
Quoting @zykh from #265 :
"Looking quickly at netget.c's get_type() (and the same thing applies to upsrw): if a var is an ENUM or RANGE, then the base type (STRING/NUMERIC) is not printed: RANGE implies NUMERIC so we could directly print it if node->range_list exists, while ENUMs should be splitted between STRING and NUMERIC."
From @aquette:
"true for netget / upsrw: the mod is easy for netget, but requires code refactoring for upsrw. I would be in favor of a separate ticket, for 2.7.5, if you don't mind, not to delay much more 2.7.4 Would it be ok for you"
The text was updated successfully, but these errors were encountered: