aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-04 15:25:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-06-07 17:38:18 +0200
commitedf35936255b21b2c84fa490a1cba71a9c3166b4 (patch)
treec532f3bb56e1a91de850cf1c4e473b912794a15d
parentba45c48344ec945389a6b5d511a22686cff4673a (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 f64329a6..4662e085 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -122,10 +122,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;
}
@@ -212,7 +214,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;
}
@@ -265,6 +269,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;
}
}
@@ -282,6 +287,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;
}
}
@@ -300,6 +306,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);
}
}
@@ -549,6 +556,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);
@@ -612,7 +620,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;
}
}