summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-27 14:40:51 +0700
committerfixeria <axilirator@gmail.com>2020-05-29 15:31:12 +0000
commit5afe885d2614a7508d02c802861172ac137362b0 (patch)
tree317bd9426a548edfd9d828c7414d92dcfd5c55bb /library
parentb15f750b9ca16284ecb37dea78422d13cc4a4fb5 (diff)
library/L1CTL_PortType: refactor L1CTL channel establishment
- Get rid of f_L1CTL_DM_EST_REQ, it's not really needed. - Derive ts_L1CTL_DM_EST_REQ_H0 from ts_L1CTL_DM_EST_REQ. - Turn all its params into (value) templates. - Turn it into a (value) template itself. - Pass GsmArfcn directly to ts_L1CTL_DM_EST_REQ_H0. Change-Id: I4f275e22d4309a23b4ed301a0779c4ecb92023a8 Related: OS#4546
Diffstat (limited to 'library')
-rw-r--r--library/L1CTL_PortType.ttcn8
-rw-r--r--library/L1CTL_Types.ttcn20
-rw-r--r--library/LAPDm_RAW_PT.ttcn2
3 files changed, 20 insertions, 10 deletions
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index c595b03..cc2ff93 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -201,14 +201,12 @@ module L1CTL_PortType {
}
T.stop;
}
- function f_L1CTL_DM_EST_REQ(L1CTL_PT pt, Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) {
- pt.send(ts_L1CTL_DM_EST_REQ(arfcn, chan_nr, tsc));
- }
/* Send DM_EST_REQ from parameters derived from IMM ASS */
function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass) {
- f_L1CTL_DM_EST_REQ(pt, { false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr,
- imm_ass.chan_desc.tsc);
+ pt.send(ts_L1CTL_DM_EST_REQ_H0(imm_ass.chan_desc.chan_nr,
+ imm_ass.chan_desc.tsc,
+ imm_ass.chan_desc.arfcn));
}
/* Send DM_REL_REQ from parameters derived from IMM ASS */
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index e939f72..0870a20 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -548,7 +548,9 @@ module L1CTL_Types {
}
}
- template L1ctlUlMessage ts_L1CTL_DM_EST_REQ(Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) := {
+ /* Base template to be inherited by ts_L1CTL_DM_EST_REQ_H0 and ts_L1CTL_DM_EST_REQ_H1 */
+ private template (value) L1ctlUlMessage ts_L1CTL_DM_EST_REQ(template (value) RslChannelNr chan_nr,
+ template (value) GsmTsc tsc) := {
header := ts_L1ctlHeader(L1CTL_DM_EST_REQ),
ul_info := {
chan_nr := chan_nr,
@@ -560,15 +562,25 @@ module L1CTL_Types {
payload := {
dm_est_req := {
tsc := tsc,
- h := 0,
- arfcn := arfcn,
- hopping := omit,
tch_mode := 0,
audio_mode := t_L1CTL_AudioModeNone
}
}
}
+ template (value) L1ctlUlMessage ts_L1CTL_DM_EST_REQ_H0(template (value) RslChannelNr chan_nr,
+ template (value) GsmTsc tsc,
+ template (value) GsmArfcn arfcn)
+ modifies ts_L1CTL_DM_EST_REQ := {
+ payload := {
+ dm_est_req := {
+ h := 0,
+ arfcn := { false, arfcn },
+ hopping := omit
+ }
+ }
+ }
+
template L1ctlUlMessage ts_L1CTL_DM_REL_REQ(RslChannelNr chan_nr) := {
header := ts_L1ctlHeader(L1CTL_DM_REL_REQ),
ul_info := {
diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn
index 75d18d9..394deab 100644
--- a/library/LAPDm_RAW_PT.ttcn
+++ b/library/LAPDm_RAW_PT.ttcn
@@ -246,7 +246,7 @@ module LAPDm_RAW_PT {
set_ph_state(PH_STATE_TUNING_DCH);
/* store/save channel description */
chan_desc.chan_nr := chan_nr;
- f_L1CTL_DM_EST_REQ(L1CTL,arfcn, chan_nr, tsc);
+ L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(chan_nr, tsc, arfcn.arfcn));
set_ph_state(PH_STATE_DCH);
}