aboutsummaryrefslogtreecommitdiffstats
path: root/library/LAPDm_RAW_PT.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/LAPDm_RAW_PT.ttcn')
-rw-r--r--library/LAPDm_RAW_PT.ttcn36
1 files changed, 36 insertions, 0 deletions
diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn
index fe2d3212..222c1aa0 100644
--- a/library/LAPDm_RAW_PT.ttcn
+++ b/library/LAPDm_RAW_PT.ttcn
@@ -36,6 +36,17 @@ module LAPDm_RAW_PT {
charstring err optional
}
+ /* directly switch to a dedicated channel (without RACH/IMM.ASS */
+ type record DCCH_switch_req {
+ Arfcn arfcn,
+ RslChannelNr chan_nr,
+ GsmTsc tsc
+ }
+
+ type record DCCH_switch_res {
+ charstring err optional
+ }
+
type record length(8) of uint8_t TfiList;
type record TbfPars {
GsmArfcn arfcn optional,
@@ -104,12 +115,14 @@ module LAPDm_RAW_PT {
type port LAPDm_SP_PT message {
in BCCH_tune_req,
DCCH_establish_req,
+ DCCH_switch_req,
DCCH_release_req,
TBF_UL_establish_req,
TBF_DL_establish_req,
RLCMAC_ph_data_req,
LAPDm_ph_data;
out DCCH_establish_res,
+ DCCH_switch_res,
TBF_UL_establish_res,
RLCMAC_ph_data_ind,
LAPDm_ph_data;
@@ -118,11 +131,13 @@ module LAPDm_RAW_PT {
/* port from user (external) point of view */
type port LAPDm_PT message {
in DCCH_establish_res,
+ DCCH_switch_res,
TBF_UL_establish_res,
RLCMAC_ph_data_ind,
LAPDm_ph_data;
out BCCH_tune_req,
DCCH_establish_req,
+ DCCH_switch_req,
DCCH_release_req,
TBF_UL_establish_req,
TBF_DL_establish_req,
@@ -222,6 +237,15 @@ module LAPDm_RAW_PT {
set_ph_state(PH_STATE_DCH);
}
+ /* switching directly to a dedicated channel *without RACH/IMM-ASS */
+ private function f_switch_dcch(Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) runs on lapdm_CT {
+ 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);
+ set_ph_state(PH_STATE_DCH);
+ }
+
/* initialize a tfi_usf array with "not used" value 255 for all TN */
function f_TfiUsfArrInit() return TfiUsfArr {
var TfiUsfArr tua := { 255, 255, 255, 255, 255, 255, 255, 255 };
@@ -374,6 +398,7 @@ module LAPDm_RAW_PT {
var RLCMAC_ph_data_ind rpdi;
var RLCMAC_ph_data_req rpdr;
var DCCH_establish_req est_req;
+ var DCCH_switch_req sw_req;
var DCCH_establish_res est_res;
f_init_tbf();
@@ -422,6 +447,17 @@ module LAPDm_RAW_PT {
}
LAPDM_SP.send(res);
}
+ [] LAPDM_SP.receive(DCCH_switch_req:?) -> value sw_req {
+ var DCCH_switch_res res;
+ f_switch_dcch(sw_req.arfcn, sw_req.chan_nr, sw_req.tsc);
+ if (ph_state == PH_STATE_DCH) {
+ res := { omit };
+ } else {
+ res := { "Unable to switch to DCCH" };
+ }
+ LAPDM_SP.send(res);
+ }
+
[] as_tbf_ul_est();
[] as_tbf_dl_est();