blob: 6e4fa4d26d449c8d41ac69a06407aad81f556d93 [file] [log] [blame]
Pau Espin Pedrol4456b6f2019-05-24 16:54:19 +02001#pragma once
2
Pau Espin Pedrol6a305fe2019-05-24 19:58:20 +02003#include <osmocom/core/rate_ctr.h>
4#include <osmocom/vty/command.h>
5
6enum 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
14struct 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
22extern const struct value_string rate_ctr_intv[];
23extern const struct value_string trx_chan_ctr_names[];
24
Pau Espin Pedrol4456b6f2019-05-24 16:54:19 +020025struct trx_ctx;
26void trx_rate_ctr_init(void *ctx, struct trx_ctx* trx_ctx);
Pau Espin Pedrol6a305fe2019-05-24 19:58:20 +020027void trx_rate_ctr_threshold_add(struct ctr_threshold *ctr);
28int trx_rate_ctr_threshold_del(struct ctr_threshold *del_ctr);
29void trx_rate_ctr_threshold_write_config(struct vty *vty, char *indent_prefix);