aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-04 15:25:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-10-15 02:09:13 +0000
commitfb53e20dea6186046ae4a56af1ee06c5274e3ecb (patch)
treed5ae25aead4a7ef3bbd14ef66cf70edabc5c7b40
parent3d149aef4c0289f355b86c841e595f5418996230 (diff)
RSL_Emulation: logging tweaks
-rw-r--r--library/RSL_Emulation.ttcn13
1 files changed, 11 insertions, 2 deletions
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 0a204594..6c3db0b5 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -129,10 +129,12 @@ private function f_rx_or_fail(template RSL_Message exp_rx) runs on RSL_DchanHdlr
return rx_rsl;
}
[] RSL.receive {
+ log("Error: expected: ", exp_rx);
setverdict(fail, "Unexpected RSL message on DCHAN");
mtc.stop;
}
[] T.timeout {
+ log("Error: timeout, but expected: ", exp_rx);
setverdict(fail, "Timeout waiting for RSL on DCHAN");
mtc.stop;
}
@@ -200,7 +202,9 @@ private function f_cid_by_chan_nr(uint8_t trx_nr, RslChannelNr chan_nr)
runs on RSL_Emulation_CT return integer {
var integer i;
for (i := 0; i < sizeof(ConnectionTable); i := i+1) {
- if (ispresent(ConnectionTable[i].chan_nr) and
+ log("Checking Dchan handler for trx_nr=", trx_nr, " chan_nr=", chan_nr, ": [",i,"] = ",
+ ConnectionTable[i]);
+ if (ispresent(ConnectionTable[i].chan_nr) and
ConnectionTable[i].chan_nr == chan_nr and ConnectionTable[i].trx_nr == trx_nr) {
return i;
}
@@ -253,6 +257,7 @@ runs on RSL_Emulation_CT {
ConnectionTable[i].ra_fn := omit;
}
ConnectionTable[i].comp_ref := comp_ref;
+ log("Created Dchan handler [", i, "] = ", ConnectionTable[i]);
return;
}
}
@@ -270,6 +275,7 @@ runs on RSL_Emulation_CT {
ConnectionTable[i].trx_nr := trx_nr;
ConnectionTable[i].chan_nr := chan_nr;
ConnectionTable[i].comp_ref := comp_ref;
+ log("Created Dchan handler [", i, "] = ", ConnectionTable[i]);
return;
}
}
@@ -288,6 +294,7 @@ runs on RSL_Emulation_CT return integer {
if (ConnectionTable[i].stream_id == stream_id and
ConnectionTable[i].chan_nr == chan_nr and
ConnectionTable[i].comp_ref == comp_ref) {
+ log("Clearing Dchan handler [", i, "] = ", ConnectionTable[i]);
f_cid_clear(i);
}
}
@@ -550,6 +557,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
/* TODO: add timer to time-out ConnectionTable entries which
* never get followed-up to */
CLIENT_PT.send(rx_rsl.rsl) to ConnectionTable[cid].comp_ref;
+ log("Modified Dchan handler [", cid, "] = ", ConnectionTable[cid]);
} else if (ischosen(rr.payload.imm_ass_rej)) {
for (i := 0; i < sizeof(rr.payload.imm_ass_rej.payload); i := i + 1) {
ra := bit2oct(rr.payload.imm_ass_rej.payload[i].req_ref.ra);
@@ -619,7 +627,8 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
log("Storing an RSL message in the waiting queue");
WaitingQueue := WaitingQueue & { rx_rsl };
} else {
- setverdict(fail, "RSL for unknown Dchan");
+ setverdict(fail, "RSL for unknown Dchan (streamId ", rx_rsl.streamId, ", chan_nr ",
+ rx_rsl.rsl.ies[0].body.chan_nr, "): ", rx_rsl);
mtc.stop;
}
}