From b0674e9636a5010b1d9a17496afa1f6ffc1fc79b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 21 Aug 2014 22:52:50 +0200 Subject: sysmobts: Implement a small state machine for temp control Check the temperature and move between "NORMAL", "WARNING" and "CRITICAL" state. We will only return from CRITICAL to WARNING when the temperature has significantly changed, and when being in state "WARNING" we enter an intermediate state to allow an easy hysteris. --- src/osmo-bts-sysmo/misc/sysmobts_mgr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr.h') diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h index deddaadb..17a81ccb 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h @@ -18,8 +18,9 @@ enum { TEMP_ACT_PA_OFF = 0x8, }; -enum { +enum sysmobts_temp_state { STATE_NORMAL, /* Everything is fine */ + STATE_WARNING_HYST, /* Go back to normal next? */ STATE_WARNING, /* We are above the warning threshold */ STATE_CRITICAL, /* We have an issue. Wait for below warning */ }; @@ -58,11 +59,12 @@ struct sysmobts_mgr_instance { int action_warn; int action_crit; - int state; + enum sysmobts_temp_state state; }; int sysmobts_mgr_vty_init(void); int sysmobts_mgr_parse_config(struct sysmobts_mgr_instance *mgr); int sysmobts_mgr_nl_init(void); +int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr); #endif -- cgit v1.2.3