Pau Espin Pedrol | 4456b6f | 2019-05-24 16:54:19 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Pau Espin Pedrol | 6a305fe | 2019-05-24 19:58:20 +0200 | [diff] [blame] | 3 | #include <osmocom/core/rate_ctr.h> |
| 4 | #include <osmocom/vty/command.h> |
| 5 | |
| 6 | enum TrxCtr { |
| 7 | TRX_CTR_RX_UNDERRUNS, |
| 8 | TRX_CTR_RX_OVERRUNS, |
| 9 | TRX_CTR_TX_UNDERRUNS, |
| 10 | TRX_CTR_RX_DROP_EV, |
| 11 | TRX_CTR_RX_DROP_SMPL, |
| 12 | }; |
| 13 | |
| 14 | struct ctr_threshold { |
| 15 | /*! Linked list of all counter groups in the system */ |
| 16 | struct llist_head list; |
| 17 | enum rate_ctr_intv intv; |
| 18 | enum TrxCtr ctr_id; |
| 19 | uint32_t val; |
| 20 | }; |
| 21 | |
| 22 | extern const struct value_string rate_ctr_intv[]; |
| 23 | extern const struct value_string trx_chan_ctr_names[]; |
| 24 | |
Pau Espin Pedrol | 4456b6f | 2019-05-24 16:54:19 +0200 | [diff] [blame] | 25 | struct trx_ctx; |
| 26 | void trx_rate_ctr_init(void *ctx, struct trx_ctx* trx_ctx); |
Pau Espin Pedrol | 6a305fe | 2019-05-24 19:58:20 +0200 | [diff] [blame] | 27 | void trx_rate_ctr_threshold_add(struct ctr_threshold *ctr); |
| 28 | int trx_rate_ctr_threshold_del(struct ctr_threshold *del_ctr); |
| 29 | void trx_rate_ctr_threshold_write_config(struct vty *vty, char *indent_prefix); |