summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-04 15:25:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-06-30 05:29:29 +0200
commitb015416198809f4cb380bacca93de3c735dccffb (patch)
tree2a6df82933340360d51ec405c2d477446a004b7d
parent153d2387dc21f6c5cc5b5ecfd1dfaf9843fdc3bd (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 2fcb96c..3427fc6 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;
}
}