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 { |
Pau Espin Pedrol | 6a305fe | 2019-05-24 19:58:20 +0200 | [diff] [blame] | 7 | TRX_CTR_RX_OVERRUNS, |
| 8 | TRX_CTR_TX_UNDERRUNS, |
| 9 | TRX_CTR_RX_DROP_EV, |
| 10 | TRX_CTR_RX_DROP_SMPL, |
Pau Espin Pedrol | 68a7809 | 2019-07-29 20:11:25 +0200 | [diff] [blame^] | 11 | TRX_CTR_TX_DROP_EV, |
| 12 | TRX_CTR_TX_DROP_SMPL, |
Pau Espin Pedrol | 6a305fe | 2019-05-24 19:58:20 +0200 | [diff] [blame] | 13 | }; |
| 14 | |
| 15 | struct ctr_threshold { |
| 16 | /*! Linked list of all counter groups in the system */ |
| 17 | struct llist_head list; |
| 18 | enum rate_ctr_intv intv; |
| 19 | enum TrxCtr ctr_id; |
| 20 | uint32_t val; |
| 21 | }; |
| 22 | |
| 23 | extern const struct value_string rate_ctr_intv[]; |
| 24 | extern const struct value_string trx_chan_ctr_names[]; |
| 25 | |
Pau Espin Pedrol | 4456b6f | 2019-05-24 16:54:19 +0200 | [diff] [blame] | 26 | struct trx_ctx; |
| 27 | 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] | 28 | void trx_rate_ctr_threshold_add(struct ctr_threshold *ctr); |
| 29 | int trx_rate_ctr_threshold_del(struct ctr_threshold *del_ctr); |
| 30 | void trx_rate_ctr_threshold_write_config(struct vty *vty, char *indent_prefix); |