diff options
author | Yves Godin <support@nuranwireless.com> | 2015-11-12 08:32:07 -0500 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-02-15 14:26:33 +0100 |
commit | 2a711887b7e91893555891e5c033189d6705eec3 (patch) | |
tree | 00abee90a3e8d04f01f34df54f7d7f1c3494fd50 /src/osmo-bts-litecell15/misc/lc15bts_mgr.h | |
parent | 5a945dad0cb34dc351427b33a3ce0ed9dd0e394f (diff) |
LC15: Add initial support for the NuRAN Wireless Litecell 1.5
This commit adds basic support for the Litecell 1.5. Multi-TRX is not
supported yet. Instead, multiple instances of the BTS can be launched
using command line parameter -n <HW_TRX_NR> to specify if TRX 1 or
2 must be used by the bts. Note that only TRX 1 opens a connection to
the PCU. Full support for GPRS on both TRX will come at the same time
than the multi-TRX support.
The BTS manager has been adapted to match the new hardware but otherwise
it has not been improved or changed compared to the one used on the
SuperFemto/Litecell (sysmobts).
Diffstat (limited to 'src/osmo-bts-litecell15/misc/lc15bts_mgr.h')
-rw-r--r-- | src/osmo-bts-litecell15/misc/lc15bts_mgr.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.h b/src/osmo-bts-litecell15/misc/lc15bts_mgr.h new file mode 100644 index 00000000..466d0b26 --- /dev/null +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.h @@ -0,0 +1,111 @@ +#ifndef _LC15BTS_MGR_H +#define _LC15BTS_MGR_H + +#include <osmocom/vty/vty.h> +#include <osmocom/vty/command.h> + +#include <osmocom/core/select.h> +#include <osmocom/core/timer.h> + +#include <stdint.h> + +enum { + DTEMP, + DFW, + DFIND, + DCALIB, +}; + +// TODO NTQD: Define new actions like reducing output power, limit ARM core speed, shutdown second TRX/PA, ... +enum { +#if 0 + TEMP_ACT_PWR_CONTRL = 0x1, +#endif + TEMP_ACT_PA1_OFF = 0x2, + TEMP_ACT_PA2_OFF = 0x4, + TEMP_ACT_BTS_SRV_OFF = 0x10, +}; + +/* actions only for normal state */ +enum { +#if 0 + TEMP_ACT_NORM_PW_CONTRL = 0x1, +#endif + TEMP_ACT_NORM_PA1_ON = 0x2, + TEMP_ACT_NORM_PA2_ON = 0x4, + TEMP_ACT_NORM_BTS_SRV_ON= 0x10, +}; + +enum lc15bts_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 */ +}; + +/** + * 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 lc15bts_temp_limit { + int thresh_warn; + int thresh_crit; +}; + +enum mgr_vty_node { + MGR_NODE = _LAST_OSMOVTY_NODE + 1, + + ACT_NORM_NODE, + ACT_WARN_NODE, + ACT_CRIT_NODE, + LIMIT_SUPPLY_NODE, + LIMIT_SOC_NODE, + LIMIT_FPGA_NODE, + LIMIT_MEMORY_NODE, + LIMIT_TX1_NODE, + LIMIT_TX2_NODE, + LIMIT_PA1_NODE, + LIMIT_PA2_NODE, +}; + +struct lc15bts_mgr_instance { + const char *config_file; + + struct { + int action_norm; + int action_warn; + int action_crit; + + enum lc15bts_temp_state state; + + struct lc15bts_temp_limit supply_limit; + struct lc15bts_temp_limit soc_limit; + struct lc15bts_temp_limit fpga_limit; + struct lc15bts_temp_limit memory_limit; + struct lc15bts_temp_limit tx1_limit; + struct lc15bts_temp_limit tx2_limit; + struct lc15bts_temp_limit pa1_limit; + struct lc15bts_temp_limit pa2_limit; + } temp; + + struct { + int state; + int calib_from_loop; + struct osmo_timer_list calib_timeout; + } calib; +}; + +int lc15bts_mgr_vty_init(void); +int lc15bts_mgr_parse_config(struct lc15bts_mgr_instance *mgr); +int lc15bts_mgr_nl_init(void); +int lc15bts_mgr_temp_init(struct lc15bts_mgr_instance *mgr); +const char *lc15bts_mgr_temp_get_state(enum lc15bts_temp_state state); + + +int lc15bts_mgr_calib_init(struct lc15bts_mgr_instance *mgr); +int lc15bts_mgr_calib_run(struct lc15bts_mgr_instance *mgr); + +extern void *tall_mgr_ctx; + +#endif |