summaryrefslogtreecommitdiffstats
path: root/library/GSM_RR_Types.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-06-10 21:41:35 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-10 21:44:29 +0200
commite8d750e6686261f98203a0e102f48840c539a3e6 (patch)
tree064b395ada411232042f12151b37f41d5c62c6aa /library/GSM_RR_Types.ttcn
parent0aaf48d893b0ed72e22cc11df01b20ea9b42cbce (diff)
bts: More complete AGCH / IMM.ASS testing
The existing test simply sent 1000 messages via RSL without checking what actually arrived on the radio interface, or without expecting/counting any RSL DELETE IND. Let's fix this by introducing test sending IMM.ASS at three different rates, with related expectations in terms of nubmer of IMM.ASS arriving on Um vs. RSL DELETE IND arriving at BSC. Change-Id: Ib6043b76ba1d7aaff107bb612f63b5a747d8720c Related: OS#2990 Related: SYS#2695
Diffstat (limited to 'library/GSM_RR_Types.ttcn')
-rw-r--r--library/GSM_RR_Types.ttcn47
1 files changed, 46 insertions, 1 deletions
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 2ceb1f8..ef209e4 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -357,6 +357,26 @@ module GSM_RR_Types {
req_ref.t3 := fn mod 51;
return req_ref
}
+ function tr_compute_ReqRef(template uint8_t ra, template GsmFrameNumber fn)
+ return template RequestReference {
+ var template RequestReference req_ref;
+ if (istemplatekind(ra, "?")) {
+ req_ref.ra := ?;
+ } else {
+ req_ref.ra := int2bit(valueof(ra), 8);
+ }
+ if (istemplatekind(fn, "?")) {
+ req_ref.t1p := ?;
+ req_ref.t2 := ?;
+ req_ref.t3 := ?;
+ } else {
+ var GsmFrameNumber fn_v := valueof(fn);
+ req_ref.t1p := (fn_v / 1326) mod 32;
+ req_ref.t2 := fn_v mod 26;
+ req_ref.t3 := fn_v mod 51;
+ }
+ return req_ref;
+ }
/* 10.5.2.40 */
type integer TimingAdvance (0..219);
@@ -674,7 +694,7 @@ module GSM_RR_Types {
with { extension "prototype(convert) decode(RAW)" };
- template GsmRrMessage ts_IMM_ASS(uint8_t ra, GsmFrameNumber fn, TimingAdvance ta,
+ template (value) GsmRrMessage ts_IMM_ASS(uint8_t ra, GsmFrameNumber fn, TimingAdvance ta,
ChannelDescription ch_desc, MobileAllocation ma) := {
header := t_RrHeader(IMMEDIATE_ASSIGNMENT, 0),
payload := {
@@ -696,6 +716,31 @@ module GSM_RR_Types {
}
};
+ template GsmRrMessage tr_IMM_ASS(template uint8_t ra := ?, template GsmFrameNumber fn := ?,
+ template TimingAdvance ta := ?,
+ template ChannelDescription ch_desc := ?,
+ template MobileAllocation ma := ?) := {
+ header := t_RrHeader(IMMEDIATE_ASSIGNMENT, 0),
+ payload := {
+ imm_ass := {
+ ded_or_tbf := {
+ spare := '0'B,
+ tma := false,
+ downlink := false,
+ tbf := false
+ },
+ page_mode := PAGE_MODE_NORMAL,
+ chan_desc := ch_desc,
+ pkt_chan_desc := omit,
+ req_ref := tr_compute_ReqRef(ra, fn),
+ timing_advance := ta,
+ mobile_allocation := ma,
+ rest_octets := *
+ }
+ }
+ };
+
+
template (value) GsmRrL3Message ts_MEAS_REP(boolean valid, uint6_t rxl_f, uint6_t rxl_s,
uint3_t rxq_f, uint3_t rxq_s,
template (omit) NcellReports reps) := {