EDGE: Add random burst generator filler option
When EDGE is enabled with the '-e' option, the random burst generator switches from GMSK normal bursts to 8-PSK EDGE bursts. $ ./osmo-trx -e -r 7 Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
This commit is contained in:
parent
8ee2f38a87
commit
af717b2d3c
|
@ -84,9 +84,12 @@ bool TransceiverState::init(int filler, size_t sps, float scale, size_t rtsc)
|
||||||
case Transceiver::FILLER_DUMMY:
|
case Transceiver::FILLER_DUMMY:
|
||||||
burst = generateDummyBurst(sps, n);
|
burst = generateDummyBurst(sps, n);
|
||||||
break;
|
break;
|
||||||
case Transceiver::FILLER_RAND:
|
case Transceiver::FILLER_NORM_RAND:
|
||||||
burst = genRandNormalBurst(rtsc, sps, n);
|
burst = genRandNormalBurst(rtsc, sps, n);
|
||||||
break;
|
break;
|
||||||
|
case Transceiver::FILLER_EDGE_RAND:
|
||||||
|
burst = generateEdgeBurst(rtsc);
|
||||||
|
break;
|
||||||
case Transceiver::FILLER_ZERO:
|
case Transceiver::FILLER_ZERO:
|
||||||
default:
|
default:
|
||||||
burst = generateEmptyBurst(sps, n);
|
burst = generateEmptyBurst(sps, n);
|
||||||
|
@ -96,8 +99,10 @@ bool TransceiverState::init(int filler, size_t sps, float scale, size_t rtsc)
|
||||||
fillerTable[i][n] = burst;
|
fillerTable[i][n] = burst;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filler == Transceiver::FILLER_RAND)
|
if ((filler == Transceiver::FILLER_NORM_RAND) ||
|
||||||
chanType[n] = Transceiver::TSC;
|
(filler == Transceiver::FILLER_EDGE_RAND)) {
|
||||||
|
chanType[n] = Transceiver::TSC;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -154,7 +154,8 @@ public:
|
||||||
enum FillerType {
|
enum FillerType {
|
||||||
FILLER_DUMMY,
|
FILLER_DUMMY,
|
||||||
FILLER_ZERO,
|
FILLER_ZERO,
|
||||||
FILLER_RAND,
|
FILLER_NORM_RAND,
|
||||||
|
FILLER_EDGE_RAND,
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -181,9 +181,12 @@ bool trx_setup_config(struct trx_config *config)
|
||||||
case Transceiver::FILLER_ZERO:
|
case Transceiver::FILLER_ZERO:
|
||||||
fillstr = "Disabled";
|
fillstr = "Disabled";
|
||||||
break;
|
break;
|
||||||
case Transceiver::FILLER_RAND:
|
case Transceiver::FILLER_NORM_RAND:
|
||||||
fillstr = "Normal busrts with random payload";
|
fillstr = "Normal busrts with random payload";
|
||||||
break;
|
break;
|
||||||
|
case Transceiver::FILLER_EDGE_RAND:
|
||||||
|
fillstr = "EDGE busrts with random payload";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream ost("");
|
std::ostringstream ost("");
|
||||||
|
@ -376,7 +379,7 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
config->rtsc = atoi(optarg);
|
config->rtsc = atoi(optarg);
|
||||||
config->filler = Transceiver::FILLER_RAND;
|
config->filler = Transceiver::FILLER_NORM_RAND;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
config->rssi_offset = atof(optarg);
|
config->rssi_offset = atof(optarg);
|
||||||
|
@ -394,6 +397,9 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config->edge && (config->filler == Transceiver::FILLER_NORM_RAND))
|
||||||
|
config->filler = Transceiver::FILLER_EDGE_RAND;
|
||||||
|
|
||||||
if ((config->tx_sps != 1) && (config->tx_sps != 4)) {
|
if ((config->tx_sps != 1) && (config->tx_sps != 4)) {
|
||||||
printf("Unsupported samples-per-symbol %i\n\n", config->tx_sps);
|
printf("Unsupported samples-per-symbol %i\n\n", config->tx_sps);
|
||||||
print_help();
|
print_help();
|
||||||
|
|
Loading…
Reference in New Issue