srsran_rf: cosmetic changes

master
Robert Falkenberg 3 years ago
parent 3a73d84294
commit 2570c2ce77

@ -85,7 +85,6 @@ static srsran_rf_plugin_t plugin_dummy = {"", NULL, &srsran_rf_dev_dummy};
#endif
/**
* Collection of all currently available RF plugins
*/

@ -129,6 +129,7 @@ SRSRAN_API int rf_file_send_timed_multi(void* h,
* @param[in] base_srate Sample rate of RX and TX files
* @return SRSRAN_SUCCESS on success, otherwise error code
*/
SRSRAN_API int rf_file_open_file(void** h, FILE** rx_files, FILE** tx_files, uint32_t nof_channels, uint32_t base_srate);
SRSRAN_API int
rf_file_open_file(void** h, FILE** rx_files, FILE** tx_files, uint32_t nof_channels, uint32_t base_srate);
#endif // SRSRAN_RF_FILE_IMP_H

@ -19,7 +19,7 @@
extern "C" {
#endif
SRSRAN_API int register_plugin(rf_dev_t **rf_api);
SRSRAN_API int register_plugin(rf_dev_t** rf_api);
#ifdef __cplusplus
}

@ -26,8 +26,8 @@
#include <SoapySDR/Formats.h>
#include <SoapySDR/Logger.h>
#include <SoapySDR/Time.h>
#include <SoapySDR/Version.h>
#include <SoapySDR/Types.h>
#include <SoapySDR/Version.h>
#define HAVE_ASYNC_THREAD 0

@ -93,12 +93,11 @@ void enb_tx_function(const char* tx_args, bool timed_tx)
// send data subframe per subframe
uint32_t num_txed_samples = 0;
// initial transmission without ts
void* data_ptr[SRSRAN_MAX_PORTS] = {NULL};
cf_t tx_buffer[NOF_RX_ANT][SF_LEN];
for (int c = 0; c < NOF_RX_ANT; c++) {
memcpy(&tx_buffer[c], &enb_tx_buffer[c][num_txed_samples], SF_LEN * sizeof (cf_t));
memcpy(&tx_buffer[c], &enb_tx_buffer[c][num_txed_samples], SF_LEN * sizeof(cf_t));
data_ptr[c] = &tx_buffer[c][0];
}
int ret = srsran_rf_send_multi(&enb_radio, (void**)data_ptr, SF_LEN, true, true, false);
@ -116,7 +115,7 @@ void enb_tx_function(const char* tx_args, bool timed_tx)
// prepare data buffer
for (int c = 0; c < NOF_RX_ANT; c++) {
memcpy(&tx_buffer[c], &enb_tx_buffer[c][num_txed_samples], SF_LEN * sizeof (cf_t));
memcpy(&tx_buffer[c], &enb_tx_buffer[c][num_txed_samples], SF_LEN * sizeof(cf_t));
data_ptr[c] = &tx_buffer[c][0];
}
@ -235,34 +234,34 @@ int param_test(const char* args_param, const int num_channels)
int main()
{
srsran_rf_load_plugins();
// // two Rx ports
// if (param_test("rx_port=ipc://dl0,rx_port1=ipc://dl1", 2)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // multiple rx ports, no channel index provided
// if (param_test("rx_port=ipc://dl0,rx_port=ipc://dl1,rx_port=ipc://dl2,rx_port=ipc://dl3,base_srate=1.92e6", 4)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // One Rx, one Tx and all generic options
// if (param_test("rx_port0=tcp://"
// "localhost:2000,rx_format=sc16,tx_format=sc16,tx_type=pub,rx_type=sub,base_srate=1.92e6,id=test",
// 1)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // 1 port, 2 antennas, MIMO freq config
// if (param_test(
// "tx_port0=tcp://*:2001,tx_port1=tcp://*:2003,rx_port0=tcp://localhost:2000,rx_port1=tcp://"
// "localhost:2002,id=ue,base_srate=23.04e6,tx_freq0=2510e6,tx_freq1=2510e6,rx_freq0=2630e6,,rx_freq1=2630e6",
// 2)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // two Rx ports
// if (param_test("rx_port=ipc://dl0,rx_port1=ipc://dl1", 2)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // multiple rx ports, no channel index provided
// if (param_test("rx_port=ipc://dl0,rx_port=ipc://dl1,rx_port=ipc://dl2,rx_port=ipc://dl3,base_srate=1.92e6", 4)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // One Rx, one Tx and all generic options
// if (param_test("rx_port0=tcp://"
// "localhost:2000,rx_format=sc16,tx_format=sc16,tx_type=pub,rx_type=sub,base_srate=1.92e6,id=test",
// 1)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
// // 1 port, 2 antennas, MIMO freq config
// if (param_test(
// "tx_port0=tcp://*:2001,tx_port1=tcp://*:2003,rx_port0=tcp://localhost:2000,rx_port1=tcp://"
// "localhost:2002,id=ue,base_srate=23.04e6,tx_freq0=2510e6,tx_freq1=2510e6,rx_freq0=2630e6,,rx_freq1=2630e6",
// 2)) {
// fprintf(stderr, "Param test failed!\n");
// return SRSRAN_ERROR;
// }
#if NOF_RX_ANT == 1
// single tx, single rx with continuous transmissions (no timed tx) using IPC transport

Loading…
Cancel
Save