Transceiver: Support SETFORMAT command

Only old v0 is supported so far.

Related: OS#4006
Change-Id: If9fc22f9987238a5ff870df7718de4efc9e04289
This commit is contained in:
Pau Espin 2019-07-03 16:17:06 +02:00 committed by pespin
parent 15fa64bce4
commit 13c81098f8
1 changed files with 14 additions and 0 deletions

View File

@ -868,6 +868,20 @@ void Transceiver::driveControl(size_t chan)
mStates[chan].chanType[timeslot] = (ChannelCombination) corrCode;
setModulus(timeslot, chan);
sprintf(response,"RSP SETSLOT 0 %d %d",timeslot,corrCode);
} else if (match_cmd(command, "SETFORMAT", &params)) {
// set TRXD protocol version
unsigned version_recv;
sscanf(params, "%u", &version_recv);
LOGC(DTRXCTRL, INFO) << "BTS requests TRXD version switch: " << version_recv;
if (version_recv > TRX_DATA_FORMAT_VER) {
LOGC(DTRXCTRL, INFO) << "rejecting TRXD version " << version_recv
<< "in favor of " << TRX_DATA_FORMAT_VER;
sprintf(response, "RSP SETFORMAT %u %u", TRX_DATA_FORMAT_VER, version_recv);
} else {
LOGC(DTRXCTRL, NOTICE) << "switching to TRXD version " << version_recv;
mVersionTRXD = version_recv;
sprintf(response, "RSP SETFORMAT %u %u", version_recv, version_recv);
}
} else if (match_cmd(command, "_SETBURSTTODISKMASK", &params)) {
// debug command! may change or disapear without notice
// set a mask which bursts to dump to disk