diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-21 22:52:50 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-21 23:55:27 +0200 |
commit | b0674e9636a5010b1d9a17496afa1f6ffc1fc79b (patch) | |
tree | f1c93387fd754052d2edb5c03cd76481cf0eaaf6 /src/osmo-bts-sysmo/misc/sysmobts_mgr.h | |
parent | d036cce744b4c0da6b147fe94d7f8ce723f8bb30 (diff) |
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.
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr.h')
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_mgr.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 |