lapdm: Updated to recent changes in library code (make it compile again)
diff --git a/lapdm/L1CTL_Test.ttcn b/lapdm/L1CTL_Test.ttcn
index e780de8..98dc43b 100644
--- a/lapdm/L1CTL_Test.ttcn
+++ b/lapdm/L1CTL_Test.ttcn
@@ -91,6 +91,30 @@
}
}
+ template LapdmFrame t_nopayload(template GsmSapi sapi) := {
+ b := {
+ addr := tr_LapdmAddr(sapi, true),
+ ctrl := ?,
+ len := 0,
+ m := false,
+ el := 1,
+ payload := ''O
+ }
+ }
+
+ template LapdmFrame LAPDm_B_DISC(template GsmSapi sapi) modifies t_nopayload := {
+ b := {
+ ctrl := t_LapdmCtrlDISC(true)
+ }
+ }
+
+ template LapdmFrame LAPDm_B_RR(template GsmSapi sapi, template uint3_t nr) modifies t_nopayload := {
+ b := {
+ ctrl := t_LapdmCtrlRR(nr, false)
+ }
+ }
+
+
function f_test_sabm_results_in_ua(uint8_t sapi, boolean use_sacch, octetstring payload) runs on dummy_CT return boolean {
var LAPDm_ph_data phd;
var boolean result := false;
@@ -106,6 +130,7 @@
[] LAPDM.receive(t_PH_DATA(?, ?, ?)) -> value phd { log("Other PH-DATA: ", phd); repeat; }
[] T.timeout { }
}
+ LAPDM.send(t_PH_DATA(sapi, use_sacch, LAPDm_B_RR(sapi, 0)));
f_release_dcch();
return result;
}
@@ -169,8 +194,22 @@
f_release_dcch();
}
+ /* we test that a re-transmitted SABM with identical payload will result in the retransmission of a
+ * SABM. This is required during the contention resolution procedure as specified in 8.4.1.4 */
+ testcase TC_sabm_retransmit() runs on dummy_CT {
+ const octetstring payload := '00FEFEDEADBEEF'O;
+ f_init();
+ if (not f_test_sabm_results_in_ua(0, false, payload)) {
+ setverdict(fail, "UA not received for first SABM");
+ }
+ if (not f_test_sabm_results_in_ua(0, false, payload)) {
+ setverdict(fail, "UA not received for second SABM");
+ }
+ setverdict(pass);
+ }
testcase TC_foo() runs on dummy_CT {
+ var LapdmFrame lf;
/*
var LapdmFrame lf := valueof(LAPDm_B_UA(0, ''O));
log("ENC UA: ", enc_LapdmFrame(lf));
@@ -180,6 +219,16 @@
log("DEC UI AF: ", dec_LapdmAddressField('03'O));
*/
+
+ lf := valueof(LAPDm_B_RR(0, 0));
+ log("ENC RR: ", enc_LapdmFrame(lf));
+
+ lf := valueof(LAPDm_B_UA(0, ''O));
+ log("ENC UA: ", enc_LapdmFrame(lf));
+
+ lf := valueof(LAPDm_B_UI(0, ''O));
+ log("ENC UI: ", enc_LapdmFrame(lf));
+
log("DEC UI CU: ", dec_LapdmCtrlU('03'O));
log("DEC UI CT: ", dec_LapdmCtrl('03'O));
@@ -194,9 +243,12 @@
control {
execute(TC_foo());
execute(TC_sabm_ua_dcch_sapi0());
+/*
execute(TC_sabm_ua_dcch_sapi0_nopayload());
execute(TC_sabm_ua_dcch_sapi3());
execute(TC_sabm_ua_dcch_sapi4());
execute(TC_sabm_contention());
+ execute(TC_sabm_retransmit());
+*/
}
}