Neels Hofmeyr | f28f1ef | 2018-04-20 15:53:53 +0200 | [diff] [blame] | 1 | #pragma once |
Harald Welte | b4771a6 | 2012-11-11 10:58:51 +0100 | [diff] [blame] | 2 | |
| 3 | #include <stdint.h> |
| 4 | |
Neels Hofmeyr | c016479 | 2017-09-04 15:15:32 +0200 | [diff] [blame] | 5 | #include <osmocom/bsc/meas_rep.h> |
Harald Welte | b4771a6 | 2012-11-11 10:58:51 +0100 | [diff] [blame] | 6 | |
| 7 | struct meas_feed_hdr { |
| 8 | uint8_t msg_type; |
| 9 | uint8_t reserved; |
| 10 | uint16_t version; |
| 11 | }; |
| 12 | |
| 13 | struct meas_feed_meas { |
| 14 | struct meas_feed_hdr hdr; |
| 15 | char imsi[15+1]; |
| 16 | char name[31+1]; |
| 17 | char scenario[31+1]; |
| 18 | struct gsm_meas_rep mr; |
Alexander Chemeris | 08c508f | 2015-08-20 20:48:39 -0400 | [diff] [blame] | 19 | /* The logical channel type, enum gsm_chan_t */ |
| 20 | uint8_t lchan_type; |
| 21 | /* The physical channel type, enum gsm_phys_chan_config */ |
| 22 | uint8_t pchan_type; |
Martin Hauke | a29affd | 2019-11-13 22:10:41 +0100 | [diff] [blame] | 23 | /* number of this BTS in network */ |
Alexander Chemeris | 08c508f | 2015-08-20 20:48:39 -0400 | [diff] [blame] | 24 | uint8_t bts_nr; |
| 25 | /* number of this TRX in the BTS */ |
| 26 | uint8_t trx_nr; |
| 27 | /* number of this timeslot at the TRX */ |
| 28 | uint8_t ts_nr; |
| 29 | /* The logical subslot number in the TS */ |
| 30 | uint8_t ss_nr; |
Harald Welte | b4771a6 | 2012-11-11 10:58:51 +0100 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | enum meas_feed_msgtype { |
| 34 | MEAS_FEED_MEAS = 0, |
| 35 | }; |
| 36 | |
Alexander Chemeris | 08c508f | 2015-08-20 20:48:39 -0400 | [diff] [blame] | 37 | #define MEAS_FEED_VERSION 1 |
Harald Welte | b4771a6 | 2012-11-11 10:58:51 +0100 | [diff] [blame] | 38 | |
Neels Hofmeyr | f28f1ef | 2018-04-20 15:53:53 +0200 | [diff] [blame] | 39 | int meas_feed_cfg_set(const char *dst_host, uint16_t dst_port); |
| 40 | void meas_feed_scenario_set(const char *name); |
Harald Welte | b4771a6 | 2012-11-11 10:58:51 +0100 | [diff] [blame] | 41 | |
Neels Hofmeyr | f28f1ef | 2018-04-20 15:53:53 +0200 | [diff] [blame] | 42 | void meas_feed_cfg_get(char **host, uint16_t *port); |
| 43 | const char *meas_feed_scenario_get(void); |