aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/osmo-trx.cpp
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2014-01-25 02:34:03 -0500
committerThomas Tsou <tom@tsou.cc>2014-01-26 21:52:46 -0500
commit15d743efaf8d3ec8dacd37fbac434c1e719c0b30 (patch)
tree31a8dba7d4742e575981d57985e5973c8fc92712 /Transceiver52M/osmo-trx.cpp
parentaf506441b3002ee2253e71a50120c88b100007b8 (diff)
Transceiver52M: Disable filler table retransmissions by default
Burst selection at a particular time works in the following order of priority. 1. Slot is disabled with channel combination set to NONE (default) 1. Burst exists in priority queue for the current time. 2. Filler table entry is used This patch sets default behaviour to force all filler table entries to zero and disallows filler table changes. This effectively means that only bursts received from upper layers will be transmitted and nothing will be automatically transmitted in the absence or delay of incoming burts at a particular time. New Command line option "Enable C0 filler table" allows reverting to previous idle burst generation and retransmission behaviour on TRX0. Retransmission cannot be enabled on non-C0 channels. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/osmo-trx.cpp')
-rw-r--r--Transceiver52M/osmo-trx.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 98112bb..bb2c489 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -66,6 +66,7 @@ struct trx_config {
unsigned sps;
unsigned chans;
bool extref;
+ bool filler;
bool diversity;
};
@@ -116,7 +117,7 @@ bool testConfig()
*/
bool trx_setup_config(struct trx_config *config)
{
- std::string refstr, divstr;
+ std::string refstr, fillstr, divstr;
if (!testConfig())
return false;
@@ -163,6 +164,7 @@ bool trx_setup_config(struct trx_config *config)
config->chans = 2;
refstr = config->extref ? "Enabled" : "Disabled";
+ fillstr = config->filler ? "Enabled" : "Disabled";
divstr = config->diversity ? "Enabled" : "Disabled";
std::ostringstream ost("");
@@ -174,6 +176,7 @@ bool trx_setup_config(struct trx_config *config)
ost << " Channels................ " << config->chans << std::endl;
ost << " Samples-per-Symbol...... " << config->sps << std::endl;
ost << " External Reference...... " << refstr << std::endl;
+ ost << " C0 Filler Table......... " << fillstr << std::endl;
ost << " Diversity............... " << divstr << std::endl;
std::cout << ost << std::endl;
@@ -231,7 +234,7 @@ Transceiver *makeTransceiver(struct trx_config *config, RadioInterface *radio)
trx = new Transceiver(config->port, config->addr.c_str(), config->sps,
config->chans, GSM::Time(3,0), radio);
- if (!trx->init()) {
+ if (!trx->init(config->filler)) {
LOG(ALERT) << "Failed to initialize transceiver";
delete trx;
return NULL;
@@ -279,7 +282,8 @@ static void print_help()
" -d Enable dual channel diversity receiver\n"
" -x Enable external 10 MHz reference\n"
" -s Samples-per-symbol (1 or 4)\n"
- " -c Number of ARFCN channels (default=1)\n",
+ " -c Number of ARFCN channels (default=1)\n"
+ " -f Enable C0 filler table\n",
"EMERG, ALERT, CRT, ERR, WARNING, NOTICE, INFO, DEBUG");
}
@@ -291,9 +295,10 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
config->sps = 0;
config->chans = 0;
config->extref = false;
+ config->filler = false;
config->diversity = false;
- while ((option = getopt(argc, argv, "ha:l:i:p:c:dxs:")) != -1) {
+ while ((option = getopt(argc, argv, "ha:l:i:p:c:dxfs:")) != -1) {
switch (option) {
case 'h':
print_help();
@@ -320,6 +325,9 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
case 'x':
config->extref = true;
break;
+ case 'f':
+ config->filler = true;
+ break;
case 's':
config->sps = atoi(optarg);
if ((config->sps != 1) && (config->sps != 4)) {