From 2a9af7d9638c15cf66eb3da3c71473ff709aba4c Mon Sep 17 00:00:00 2001 From: Manuel Bouyer Date: Wed, 12 Feb 2025 14:20:33 +0100 Subject: [PATCH] netvision-mib: sync netvision_output_info with SOCOMECUPS-MIB.txt The netvision_output_info array doens't match the upsOutputSource values from SOCOMECUPS-MIB.txt (the only Socomec MIB publically available) and also doesn't match values observed on our MASTERYS 3/3 SYSTEM which has a Net Vision v6.32 card. Signed-off-by: Manuel Bouyer --- drivers/netvision-mib.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/netvision-mib.c b/drivers/netvision-mib.c index ec9ae86c0b..105c36f364 100644 --- a/drivers/netvision-mib.c +++ b/drivers/netvision-mib.c @@ -100,16 +100,21 @@ static info_lkp_t netvision_onbatt_info[] = { #define NETVISION_OID_CONTROL_STATUS ".1.3.6.1.4.1.4555.1.1.1.1.8.1" #define NETVISION_OID_CONTROL_SHUTDOWN_DELAY ".1.3.6.1.4.1.4555.1.1.1.1.8.2" +/* + * some of the output sources below are set to empty string; because we + * don't know from here if we are online or on batteries. + * In this case upsAlarmOnBattery will set the appropriate status. + */ static info_lkp_t netvision_output_info[] = { - info_lkp_default(1, ""), /* output source other */ - info_lkp_default(2, ""), /* output source none */ - info_lkp_default(3, "OL"), /* output source normal */ - info_lkp_default(4, "OL BYPASS"), /* output source bypass */ - info_lkp_default(5, "OB"), /* output source battery */ - info_lkp_default(6, "OL BOOST"), /* output source booster */ - info_lkp_default(7, "OL TRIM"), /* output source reducer */ - info_lkp_default(8, "OL"), /* output source standby */ - info_lkp_default(9, ""), /* output source ecomode */ + info_lkp_default(1, ""), /* output source unknown */ + info_lkp_default(2, ""), /* output source inverter */ + info_lkp_default(3, "OL"), /* output source mains */ + info_lkp_default(4, ""), /* output source ecomode */ + info_lkp_default(5, "OL BYPASS"), /* output source bypass */ + info_lkp_default(6, "OFF"), /* output source standby */ + info_lkp_default(7, "OL BYPASS"), /* output source maintenance bypass */ + info_lkp_default(8, "OFF"), /* output source off */ + info_lkp_default(9, ""), /* output source normal */ info_lkp_sentinel };