diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-07-31 18:51:36 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-21 23:55:27 +0200 |
commit | ca71d07e449c960ab6d1c7da5f3f43b62426a449 (patch) | |
tree | c8ca8025c498856b4144f84fcae7d0d01f743760 /src/osmo-bts-sysmo/misc/sysmobts_mgr.h | |
parent | c7ee5acba91524de4d936f502e7166078c6908fd (diff) |
sysmobts: Begin to add various limits and actions
The idea is that for different parts of the system we can define
thresholds for warning and critical (severe) temperate thresholds.
And once any of these temperatures is reached we will execute an
action. When crossing from NORMAL to WARNING or WARNING to SEVERE
we will need to apply some hysteris before switching back to the
lower level. E.g. when being SEVERE mode, at least wait until we
are below the warning level again. Besides being able to switch
off things we could start reducing the transmit power of the system
until the system is cold enough again.
No action is implemented so far, everything is varpoware!
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr.h')
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_mgr.h | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h index c71a5493..deddaadb 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h @@ -10,15 +10,59 @@ enum { DFIND, }; + +enum { + TEMP_ACT_PWR_CONTRL = 0x1, + TEMP_ACT_MASTER_OFF = 0x2, + TEMP_ACT_SLAVE_OFF = 0x4, + TEMP_ACT_PA_OFF = 0x8, +}; + +enum { + STATE_NORMAL, /* Everything is fine */ + STATE_WARNING, /* We are above the warning threshold */ + STATE_CRITICAL, /* We have an issue. Wait for below warning */ +}; + +/** + * Temperature Limits. We separate from a threshold + * that will generate a warning and one that is so + * severe that an action will be taken. + */ +struct sysmobts_temp_limit { + int thresh_warn; + int thresh_crit; +}; + enum mgr_vty_node { MGR_NODE = _LAST_OSMOVTY_NODE + 1, -}; -int sysmobts_mgr_vty_init(void); -int sysmobts_mgr_parse_config(const char *config_file); + ACT_WARN_NODE, + ACT_CRIT_NODE, + LIMIT_RF_NODE, + LIMIT_DIGITAL_NODE, + LIMIT_BOARD_NODE, + LIMIT_PA_NODE, +}; struct sysmobts_mgr_instance { const char *config_file; + + struct sysmobts_temp_limit rf_limit; + struct sysmobts_temp_limit digital_limit; + + /* Only available on sysmobts 2050 */ + struct sysmobts_temp_limit board_limit; + struct sysmobts_temp_limit pa_limit; + + int action_warn; + int action_crit; + + int state; }; + +int sysmobts_mgr_vty_init(void); +int sysmobts_mgr_parse_config(struct sysmobts_mgr_instance *mgr); int sysmobts_mgr_nl_init(void); + #endif |