search for: info_lkp_t

Displaying 16 results from an estimated 16 matches for "info_lkp_t".

2018 Feb 04
0
[PATCH 3/3] OpenUPS: fix current calculations
...s_scale_cdischarge_fun(double value); +static const char *openups_scale_vbat_fun(double value); +static const char *openups_scale_input_current_fun(double value); +static const char *openups_scale_output_current_fun(double value); static const char *openups_temperature_fun(double value); static info_lkp_t openups_charging_info[] = { @@ -162,16 +164,16 @@ static info_lkp_t openups_vout_info[] = { {0, NULL, openups_scale_vout_fun} }; -/* static info_lkp_t openups_vbat_info[] = { +static info_lkp_t openups_vbat_info[] = { {0, NULL, openups_scale_vbat_fun} -};*/ +}; -static info_lkp_t openups_c...
2012 Nov 20
2
[PATCH][RFC] OpenUPS driver
...nst char *openups_scale_vout_fun(double value); +static const char *openups_scale_vbat_fun(double value); +static const char *openups_scale_ccharge_fun(double value); +static const char *openups_scale_cdischarge_fun(double value); +static const char *openups_temperature_fun(double value); + +static info_lkp_t openups_charging_info[] = { + {0, NULL, openups_charging_fun} +}; + +static info_lkp_t openups_discharging_info[] = { + {0, NULL, openups_discharging_fun} +}; + +static info_lkp_t openups_online_info[] = { + {0, NULL, openups_online_fun} +}; + +static info_lkp_t openups_nobattery_info[] = { + {0, N...
2018 Feb 04
5
[PATCH 0/3] OpenUPS updates
Hi, I've been checking out NUT with an OpenUPS board over the last couple of weekends, and have noticed that it doesn't seem to report sensible values. This lead me to investigate usbhid-ups and delve into various issues. As mentioned in a github issue, one of the problems is with the report descriptor - dumping this from the usbhid-ups debug output and picking through it reveals that
2006 Jan 21
2
snmp-ups hacking
Hi all! I'm wondering if there's anyone doing any hacking on the snmp-ups driver at the moment. I've started looking at implementing 3phase-support, and this uncovered some rather unpleasant stuff in the snmp-ups driver that I really need to fix in order to get things sane. Those of you that's allergic to SNMP might want to stop reading now, this is rather icky ;)
2015 Mar 26
2
New snmp-ups subdriver for Huawei
...HUAWEI_SYSOID ".1.3.6.1.4.1.8072.3.2.10" +#define HUAWEI_UPSMIB ".1.3.6.1.4.1.2011" + +/* To create a value lookup structure (as needed on the 2nd line of the example + * below), use the following kind of declaration, outside of the present snmp_info_t[]: + * static info_lkp_t onbatt_info[] = { + * { 1, "OB" }, + * { 2, "OL" }, + * { 0, "NULL" } + * }; + */ + +static info_lkp_t supplymethod_info[] = { + { 1, "" }, /* no supply */ + { 2, "OL BYPASS" }, + { 3, "OL" }, + { 4, "OB" }, + { 5, "&quo...
2013 Jul 17
2
HP R12000/3 UPS reports status as OL DISCHRG OB
...d_infoval: found OB (value: 1) 0.109720 => value: 1 The first one (...3.4.5.0) is labeled in the driver as CPQPOWER_OID_POWER_STATUS. I checked around for this, and didn't find a good definition, but that seems to match the OL state. The second one seems specific to the battery: static info_lkp_t cpqpower_battery_abm_status[] = { { 1, "CHRG" }, { 2, "DISCHRG" }, /* { 3, "Floating" }, */ /* { 4, "Resting" }, */ /* { 5, "Unknown" }, */ { 0, "NULL" } } ; I could see the battery monitoring circui...
2007 Aug 11
1
apc-hid.c: watts_to_av_conversion
...atically allocated string - must not use it again before 42 done with result! */ 43 static char *watts_to_av_conversion_fun(long value) { 44 static char buf[20]; 45 46 snprintf(buf, sizeof(buf), "%.0f", value * 1.4142136); 47 return buf; 48 } 49 50 static info_lkp_t watts_to_av_conversion[] = { 51 { 0, NULL, watts_to_av_conversion_fun } 52 }; Being a power electronics engineer, the name of it made me wonder what the heck was going on. As far as I know, there is no way to convert between AV and W without knowing the phase relation between RMS voltage...
2016 May 20
1
ups.status don't switch to "OB LB"
Hello, I have a Legrand Keor T [1] monitored via snmp, everything seems to work fine, upsc output looks good [2] except that I can?t get the low battery state "OB LB? as usual (it works fine with others UPS like APC or Dell). Here is the configuration : [lgups] driver = snmp-ups port = 192.168.99.60 community = public snmp_version = v2c mibs = auto
2013 Jul 01
1
bcmxcp: Patch for cosmetic code changes
...; } return num_outlet; @@ -1267,7 +1267,7 @@ void upsdrv_initinfo(void) dstate_addcmd("test.battery.start"); upsh.instcmd = instcmd; - upsh.setvar = setvar; + upsh.setvar = setvar; return; } @@ -1871,6 +1871,6 @@ static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value) } } - upsdebugx(3, "hu_find_infoval: no matching INFO_* value for this XCP value (%g)", value); + upsdebugx(3, "nut_find_infoval: no matching INFO_* value for this XCP value (%g)", value); return NULL; } -- 1.8.1....
2008 May 20
1
UPS gracefull restart
...f there is one certainly... ;-) Can you point me out what to do to make the PC to shutdown when I set up that the UPS should gracefully restart? (for example). I found this: #define APCC_OID_POWER_STATUS ".1.3.6.1.4.1.318.1.1.1.4.1.1.0" /* Defines for APCC_OID_POWER_STATUS */ info_lkp_t apcc_pwr_info[] = { { 1, "" }, /* unknown */ { 2, "OL" }, /* onLine */ { 3, "OB" }, /* onBattery */ { 4, "BOOST" }, /* onSmartBoost */ { 5, "OFF" }, /* timedSleeping */...
2009 Oct 22
0
svn commit r2041 - trunk/drivers
...commit r2041 - trunk/drivers Author: aquette Date: Thu Oct 22 08:46:56 2009 New Revision: 2041 Log: - implement full duplex data lookup: this allows to format back complex values to send to the UPS (ie for upsrw / upscmd using non simple data mapping), - add enumerated values support, by changing info_lkp_t->fun prototype, and adding HU_FLAG_ENUM, - fix the instcmd return codes to more appropriate values, - add a dstate_addenum() support stub in dstate-hal.c - enforce checking in mge-hid.c for output.voltage.nominal values, along with the restriction to Protection Station specific feature. Also add...
2013 Jul 16
0
HP R12000/3 UPS reports status as OL DISCHRG OB
Sorry about that! Chris. Chris Pratt Development Infrastructure Manager T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 -----Original Message----- From: Charles Lepple [mailto:clepple at gmail.com] Sent: 16 July 2013 00:32 To: Pratt Chris Subject: Re: [Nut-upsuser] HP R12000/3 UPS reports status as OL DISCHRG OB On Jul 15, 2013, at 9:35 AM, Pratt Chris wrote: > Debug output
2005 Aug 25
3
Tr : NUT patches
...ps.mfr.date battery.mfr.date battery.date input.voltage.nominal input.transfer.low input.transfer.high I also added support for the following instant commands: test.panel.start test.panel.stop load.off shutdown.return shutdown.stop beeper.on beeper.off I also extended the info_lkp_t mechanism. I found that for certain data types (in particular, dates) a simple lookup table is insufficient to map the driver data to a string. I have extended the info_lkp_t structure with a hook for a custom function, and extended hu_find_infoval() to use the hook if present. This allows dates (u...
2013 Jul 03
1
bcmxcp: Patch for using command map if present to control commands added by dstate_addcmd
...(unsigned char)0x8A /* Delayed LoadPowerOff & Restart command. length 2-4 */ #define PW_UPS_OFF (unsigned char)0x8B /* UPS off command. length 1-2 */ @@ -417,5 +417,12 @@ typedef struct { double (*nuf)(const char *nut_value); /* optional NUT to HID mapping */ } info_lkp_t; +/* use explicit booleans */ +#ifndef FALSE +typedef enum ebool { FALSE, TRUE } bool_t; +#else +typedef int bool_t; +#endif + #endif /*_POWERWARE_H */ -- 1.8.1.2
2013 Jul 03
1
bcmxcp: Patch for adding ups.load and battery.voltage.low
On Jul 2, 2013, at 5:16 PM, Kjell Claesson wrote: >> I hope other people can also test this. >> >> Regards >> Alf Hogemark > > Due to some crashes on the disks and lack of time I don't have the git on the > pc now. But maybe some other can commit this. I'd like to ask people to specifically try the bcmxcp branch on GitHub - it includes some changes
2013 Jul 15
4
HP R12000/3 UPS reports status as OL DISCHRG OB
Hi. Back before Christmas Arnaud sent me a patch for the snmp-ups driver for my HP R12000/3 UPS. Unfortunately shortly after I had to take quite a lot of sick leave so wasn't able to progress it, but I'm working on it again now. I'm at the point where I can start the driver with upsdrvctl and start the daemon with upsd. When I check the UPS status though it shows as OL DISCHRG OB,