From 42b79c5f6cb852a5cfbf8eaa04e0c154d485aa28 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 3 Mar 2016 09:16:59 +0100 Subject: [PATCH] Prefer NUMBER to NUMERIC for variable type As per discussion on the Github pull request, NUMBER would be more suitable than NUMERIC --- clients/upsrw.c | 4 ++-- docs/net-protocol.txt | 2 +- server/netget.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/upsrw.c b/clients/upsrw.c index 5f1656f96b..3a0efb4636 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -366,8 +366,8 @@ static void do_type(const char *varname) } - if (!strcasecmp(answer[i], "NUMERIC")) { - printf("Type: NUMERIC\n"); + if (!strcasecmp(answer[i], "NUMBER")) { + printf("Type: NUMBER\n"); return; } diff --git a/docs/net-protocol.txt b/docs/net-protocol.txt index 4ea19f0315..5f57f007ad 100644 --- a/docs/net-protocol.txt +++ b/docs/net-protocol.txt @@ -133,7 +133,7 @@ Response: - '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) -- 'NUMERIC': this is a simple numeric value, either integer or float +- '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 , when omitted, is numeric, so either integer or float. Each diff --git a/server/netget.c b/server/netget.c index 99872c8c97..d876891532 100644 --- a/server/netget.c +++ b/server/netget.c @@ -159,7 +159,7 @@ static void get_type(nut_ctype_t *client, const char *upsname, const char *var) /* Any variable that is not string | range | enum is just a simple * numeric value */ - sendback(client, "TYPE %s %s NUMERIC\n", upsname, var); + sendback(client, "TYPE %s %s NUMBER\n", upsname, var); } static void get_var_server(nut_ctype_t *client, const char *upsname, const char *var)