Skip to content

Commit

Permalink
Fixed bug in set_tx_subcarriers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericps1 committed Nov 19, 2015
1 parent 50819a8 commit 7b3f2a4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
34 changes: 17 additions & 17 deletions scenarios/Two_Node_FDD_Network.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ node1: {

// initial USRP settings
rx_freq = 762.5e6;
rx_rate = 5e6;
rx_gain = 10.0;
rx_rate = 2.5e6;
rx_gain = 15.0;
tx_freq = 767.5e6;
tx_rate = 5e6;
tx_gain = 10.0;
tx_rate = 2.5e6;
tx_gain = 15.0;

// initial liquid OFDM settings
duplex = "FDD";
tx_gain_soft = -12.0;
tx_modulation = "qpsk";
tx_modulation = "qam4";
tx_crc = "crc32";
tx_fec0 = "v29";
tx_fec0 = "v27";
tx_fec1 = "none";
tx_delay_us = 1e3;
tx_delay_us = 5e2;

tx_subcarriers = 32;
tx_subcarrier_alloc_method = "default";
tx_subcarrier_alloc_method = "standard";
tx_guard_subcarriers = 4;
tx_central_nulls = 6;
tx_pilot_freq = 4;

rx_subcarriers = 32;
rx_subcarrier_alloc_method = "default";
rx_subcarrier_alloc_method = "standard";
rx_guard_subcarriers = 4;
rx_central_nulls = 6;
rx_pilot_freq = 4;
Expand Down Expand Up @@ -91,23 +91,23 @@ node2: {

// initial USRP settings
rx_freq = 767.5e6;
rx_rate = 5e6;
rx_gain = 10.0;
rx_rate = 2.5e6;
rx_gain = 15.0;
tx_freq = 762.5e6;
tx_rate = 5e6;
tx_gain = 10.0;
tx_rate = 2.5e6;
tx_gain = 15.0;

// initial liquid OFDM settings
duplex = "FDD";
tx_gain_soft = -12.0;
tx_modulation = "qpsk";
tx_modulation = "qam4";
tx_crc = "crc32";
tx_fec0 = "v29";
tx_fec0 = "v27";
tx_fec1 = "none";
tx_delay_us = 1e3;

tx_subcarriers = 32;
tx_subcarrier_alloc_method = "default";
tx_subcarrier_alloc_method = "custom";
tx_subcarrier_alloc: {
// guard band nulls
sc_type_1 = "null";
Expand Down Expand Up @@ -141,7 +141,7 @@ node2: {
}

rx_subcarriers = 32;
rx_subcarrier_alloc_method = "default";
rx_subcarrier_alloc_method = "custom";
rx_subcarrier_alloc: {
// guard band nulls
sc_type_1 = "null";
Expand Down
4 changes: 2 additions & 2 deletions src/ECR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ void ExtensibleCognitiveRadio::set_tx_subcarrier_alloc(char *_subcarrierAlloc) {
// destroy frame gen, set subcarrier allocation, recreate frame gen
if (_subcarrierAlloc) {
tx_params_updated.subcarrierAlloc = (unsigned char *)realloc(
(void *)tx_params.subcarrierAlloc, tx_params.numSubcarriers);
(void *)tx_params_updated.subcarrierAlloc, tx_params_updated.numSubcarriers);
memcpy(tx_params_updated.subcarrierAlloc, _subcarrierAlloc,
tx_params.numSubcarriers);
tx_params_updated.numSubcarriers);
} else {
free(tx_params_updated.subcarrierAlloc);
tx_params_updated.subcarrierAlloc = NULL;
Expand Down

0 comments on commit 7b3f2a4

Please sign in to comment.