aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcu_l1_if.h')
-rw-r--r--src/pcu_l1_if.h57
1 files changed, 20 insertions, 37 deletions
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index efe533e7..241f4943 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -20,58 +20,41 @@
#ifndef PCU_L1_IF_H
#define PCU_L1_IF_H
-
-#include <bitvector.h>
-#include <gsmL1prim.h>
-#include <sys/socket.h>
+#include <stdint.h>
extern "C" {
#include <osmocom/core/write_queue.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/timer.h>
+#include <osmocom/core/bitvec.h>
#include <osmocom/gsm/gsm_utils.h>
}
-#define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h)
-
-struct femtol1_hdl {
- struct gsm_time gsm_time;
- uint32_t hLayer1; /* handle to the L1 instance in the DSP */
- uint32_t dsp_trace_f;
- uint16_t clk_cal;
- struct llist_head wlc_list;
-
- void *priv; /* user reference */
-
- struct osmo_timer_list alive_timer;
- unsigned int alive_prim_cnt;
-
- struct osmo_fd read_ofd; /* osmo file descriptors */
- struct osmo_wqueue write_q;
-
- struct {
- uint16_t arfcn;
- uint8_t tn;
- uint8_t tsc;
- uint16_t ta;
- } channel_info;
-
+struct pcu_l1if_ts {
+ uint8_t enable;
+ uint8_t tsc;
};
-struct l1fwd_hdl {
- struct sockaddr_storage remote_sa;
- socklen_t remote_sa_len;
-
- struct osmo_wqueue udp_wq;
+struct pcu_l1if_trx {
+ uint16_t arfcn;
+ struct pcu_l1if_ts ts[8];
+};
- struct femtol1_hdl *fl1h;
+struct pcu_l1if_bts {
+ struct pcu_l1if_trx trx[8];
};
-extern struct l1fwd_hdl *l1fh;
+extern struct pcu_l1if_bts pcu_l1if_bts;
int get_current_fn();
+void set_current_fn(int fn);
-void pcu_l1if_tx(bitvec * block, GsmL1_Sapi_t sapi, int len = 23);
+void pcu_l1if_tx_pdtch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn,
+ uint32_t fn, uint8_t block_nr);
+void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn,
+ uint32_t fn, uint8_t block_nr);
+void pcu_l1if_tx_agch(bitvec * block, int len);
-int pcu_l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg);
+int pcu_l1if_open(void);
+void pcu_l1if_close(void);
#endif // PCU_L1_IF_H