From 307c27dc3095f64db813398e59afe491049bc971 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 20 Dec 2019 18:46:10 +0100 Subject: [PATCH] srsLTE: ZMQ renamed struct field --- lib/src/phy/rf/rf_zmq_imp.c | 8 ++++---- lib/src/phy/rf/rf_zmq_imp_rx.c | 4 ++-- lib/src/phy/rf/rf_zmq_imp_trx.h | 4 ++-- lib/src/phy/rf/rf_zmq_imp_tx.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/src/phy/rf/rf_zmq_imp.c b/lib/src/phy/rf/rf_zmq_imp.c index 80d228fbb..7b07b6f9e 100644 --- a/lib/src/phy/rf/rf_zmq_imp.c +++ b/lib/src/phy/rf/rf_zmq_imp.c @@ -389,8 +389,8 @@ int rf_zmq_open_multi(char* args, void** h, uint32_t nof_channels) double freq = 0.0; if (!parse_double(args, config_arg, &freq)) { - rx_opts.frequency_hz_mhz = (uint32_t)(freq / 1e6); - printf("Channel %d. Using rx_freq=%dMHz\n", i, rx_opts.frequency_hz_mhz); + rx_opts.frequency_mhz = (uint32_t)(freq / 1e6); + printf("Channel %d. Using rx_freq=%dMHz\n", i, rx_opts.frequency_mhz); } } @@ -424,8 +424,8 @@ int rf_zmq_open_multi(char* args, void** h, uint32_t nof_channels) double freq = 0.0; if (!parse_double(args, config_arg, &freq)) { - tx_opts.frequency_hz_mhz = (uint32_t)(freq / 1e6); - printf("Channel %d. Using tx_freq=%dMHz\n", i, tx_opts.frequency_hz_mhz); + tx_opts.frequency_mhz = (uint32_t)(freq / 1e6); + printf("Channel %d. Using tx_freq=%dMHz\n", i, tx_opts.frequency_mhz); } } diff --git a/lib/src/phy/rf/rf_zmq_imp_rx.c b/lib/src/phy/rf/rf_zmq_imp_rx.c index 8efdf574b..26c296208 100644 --- a/lib/src/phy/rf/rf_zmq_imp_rx.c +++ b/lib/src/phy/rf/rf_zmq_imp_rx.c @@ -120,7 +120,7 @@ int rf_zmq_rx_open(rf_zmq_rx_t* q, rf_zmq_opts_t opts, void* zmq_ctx, char* sock } q->socket_type = opts.socket_type; q->sample_format = opts.sample_format; - q->frequency_hz_mhz = opts.frequency_hz_mhz; + q->frequency_mhz = opts.frequency_mhz; if (opts.socket_type == ZMQ_SUB) { zmq_setsockopt(q->sock, ZMQ_SUBSCRIBE, "", 0); @@ -213,7 +213,7 @@ bool rf_zmq_rx_match_freq(rf_zmq_rx_t* q, uint32_t freq_hz) { bool ret = false; if (q) { - ret = (q->frequency_hz_mhz == 0 || q->frequency_hz_mhz == freq_hz); + ret = (q->frequency_mhz == 0 || q->frequency_mhz == freq_hz); } return ret; } diff --git a/lib/src/phy/rf/rf_zmq_imp_trx.h b/lib/src/phy/rf/rf_zmq_imp_trx.h index c79a92bc2..cf3d2c1e2 100644 --- a/lib/src/phy/rf/rf_zmq_imp_trx.h +++ b/lib/src/phy/rf/rf_zmq_imp_trx.h @@ -69,14 +69,14 @@ typedef struct { srslte_ringbuffer_t ringbuffer; cf_t* temp_buffer; void* temp_buffer_convert; - uint32_t frequency_hz_mhz; + uint32_t frequency_mhz; } rf_zmq_rx_t; typedef struct { const char* id; uint32_t socket_type; rf_zmq_format_t sample_format; - uint32_t frequency_hz_mhz; + uint32_t frequency_mhz; } rf_zmq_opts_t; /* diff --git a/lib/src/phy/rf/rf_zmq_imp_tx.c b/lib/src/phy/rf/rf_zmq_imp_tx.c index 2ae705815..cdf97a5d0 100644 --- a/lib/src/phy/rf/rf_zmq_imp_tx.c +++ b/lib/src/phy/rf/rf_zmq_imp_tx.c @@ -52,7 +52,7 @@ int rf_zmq_tx_open(rf_zmq_tx_t* q, rf_zmq_opts_t opts, void* zmq_ctx, char* sock } q->socket_type = opts.socket_type; q->sample_format = opts.sample_format; - q->frequency_hz_mhz = opts.frequency_hz_mhz; + q->frequency_hz_mhz = opts.frequency_mhz; rf_zmq_info(q->id, "Binding transmitter: %s\n", sock_args);