diff options
Diffstat (limited to 'src/e1_test.c')
-rw-r--r-- | src/e1_test.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/e1_test.c b/src/e1_test.c index c6d0e22..cd0bf87 100644 --- a/src/e1_test.c +++ b/src/e1_test.c @@ -9,29 +9,29 @@ #include <osmocom/core/application.h> #include <osmocom/gsm/gsm_utils.h> -#include "osmo_e1.h" +#include "osmo_e1f.h" -static struct osmo_e1_instance inst; +static struct osmo_e1f_instance inst; static struct log_info log_info = {}; /* pull data out of the transmitter and print hexdumps */ -static void pull_and_print(struct osmo_e1_instance *e1i) +static void pull_and_print(struct osmo_e1f_instance *e1i) { uint8_t buf[32]; - osmo_e1_pull_tx_frame(e1i, buf); + osmo_e1f_pull_tx_frame(e1i, buf); printf("%s\n", osmo_hexdump(buf, sizeof(buf))); } -static void data_cb(struct osmo_e1_instance_ts *e1t, struct msgb *msg) +static void data_cb(struct osmo_e1f_instance_ts *e1t, struct msgb *msg) { printf("Rx TS %u: %s\n", e1t->ts_nr, msgb_hexdump(msg)); msgb_free(msg); } -static void notify_cb(struct osmo_e1_instance *e1i, enum osmo_e1_notify_event evt, +static void notify_cb(struct osmo_e1f_instance *e1i, enum osmo_e1f_notify_event evt, bool present, void *data) { - printf("NOTIFY: %s %s\n", osmo_e1_notify_event_name(evt), present ? "PRESENT" : "ABSENT"); + printf("NOTIFY: %s %s\n", osmo_e1f_notify_event_name(evt), present ? "PRESENT" : "ABSENT"); } /* feed some random data into the E1 instance */ @@ -42,7 +42,7 @@ static void tc_rx_random() for (i = 0; i < 200; i++) { osmo_get_rand_id(buf, sizeof(buf)); - osmo_e1_rx_frame(&inst, buf); + osmo_e1f_rx_frame(&inst, buf); } } @@ -61,7 +61,7 @@ static void tc_rx_align_basic() buf[0] = 0x40; break; } - osmo_e1_rx_frame(&inst, buf); + osmo_e1f_rx_frame(&inst, buf); } } @@ -96,7 +96,7 @@ static void tc_rx_align_mframe() buf[0] = 0xc0; break; } - osmo_e1_rx_frame(&inst, buf); + osmo_e1f_rx_frame(&inst, buf); } } @@ -114,28 +114,28 @@ int main(int argc, char **argv) int i; osmo_init_logging2(NULL, &log_info); - osmo_e1_init(); + osmo_e1f_init(); - osmo_e1_instance_init(&inst, "e1_test", ¬ify_cb, true, NULL); + osmo_e1f_instance_init(&inst, "e1_test", ¬ify_cb, true, NULL); for (i = 1; i < 32; i++) { - struct osmo_e1_instance_ts *e1t = osmo_e1_instance_ts(&inst, i); - osmo_e1_ts_config(e1t, &data_cb, 40, true, OSMO_E1_TS_RAW); + struct osmo_e1f_instance_ts *e1t = osmo_e1f_instance_ts(&inst, i); + osmo_e1f_ts_config(e1t, &data_cb, 40, true, OSMO_E1F_TS_RAW); } printf("\nRx Random...\n"); - osmo_e1_instance_reset(&inst); + osmo_e1f_instance_reset(&inst); tc_rx_random(); printf("\nAlign (Basic)...\n"); - osmo_e1_instance_reset(&inst); + osmo_e1f_instance_reset(&inst); tc_rx_align_basic(); printf("\nAlign (Mframe)...\n"); - osmo_e1_instance_reset(&inst); + osmo_e1f_instance_reset(&inst); tc_rx_align_mframe(); printf("\nTX Idle...\n"); - osmo_e1_instance_reset(&inst); + osmo_e1f_instance_reset(&inst); tc_tx_idle(); } |