L1CTL_Types: Add support for L1CTL_DATA_TBF_{REQ,CONF}
Those two L1CTL primitives are extensions of L1CTL for GPRS operation
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 7a9ee3e..84593cf 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -63,6 +63,18 @@
return rr.payload.imm_ass;
}
+ function f_L1CTL_TBF_CFG(L1CTL_PT pt, boolean is_uplink, TfiUsfArr tfi_usf) {
+ timer T := 2.0;
+ T.start;
+ pt.send(t_L1CTL_TBF_CFG_REQ(is_uplink, tfi_usf));
+ alt {
+ [] pt.receive(t_L1CTL_TBF_CFG_CONF(is_uplink)) {}
+ [] pt.receive { repeat };
+ [] T.timeout { setverdict(fail, "Timeout waiting for TBF-CFG.conf") };
+ }
+ T.stop;
+ }
+
/* Send DM_EST_REQ from parameters derived from IMM ASS */
function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass) {
pt.send(t_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc));
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 7894706..4b68c61 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -41,7 +41,9 @@
L1CTL_TRAFFIC_CONF,
L1CTL_TRAFFIC_IND,
L1CTL_TBF_CFG_REQ,
- L1CTL_TBF_CFG_CONF
+ L1CTL_TBF_CFG_CONF,
+ L1CTL_DATA_TBF_REQ,
+ L1CTL_DATA_TBF_CONF
} with { variant "FIELDLENGTH(8)" };
type enumerated L1ctlCcchMode {
@@ -166,6 +168,11 @@
OCT2 padding
} with { variant "" };
+ type record L1ctlUlTbfInfo {
+ uint8_t tbf_nr,
+ OCT3 padding
+ } with { variant "" };
+
type record L1ctlFbsbFlags {
BIT5 padding,
boolean sb,
@@ -270,6 +277,7 @@
type record L1ctlUlMessage {
L1ctlHeader header,
L1ctlUlInfo ul_info optional,
+ L1ctlUlTbfInfo ul_info_tbf optional,
L1ctlUlPayload payload
} with { variant (ul_info) "PRESENCE(header.msg_type = L1CTL_RACH_REQ,
header.msg_type = L1CTL_PARAM_REQ,
@@ -279,6 +287,7 @@
header.msg_type = L1CTL_DM_FREQ_REQ,
header.msg_type = L1CTL_DM_REL_REQ,
header.msg_type = L1CTL_TRAFFIC_REQ)"
+ variant (ul_info_tbf) "PRESENCE(header.msg_type = L1CTL_DATA_TBF_REQ)"
variant (payload) "CROSSTAG(fbsb_req, header.msg_type = L1CTL_FBSB_REQ;
ccch_mode_req, header.msg_type = L1CTL_CCCH_MODE_REQ;
tch_mode_req, header.msg_type = L1CTL_TCH_MODE_REQ;
@@ -323,6 +332,7 @@
template L1ctlUlMessage t_L1ctlResetReq(template L1ctlResetType rst_type) := {
header := t_L1ctlHeader(L1CTL_RESET_REQ),
ul_info := omit,
+ ul_info_tbf := omit,
payload := {
reset_req := {
reset_type := rst_type,
@@ -335,6 +345,7 @@
template L1ctlUlMessage t_L1CTL_FBSB_REQ(template Arfcn arfcn, template L1ctlFbsbFlags flags, uint8_t sync_info_idx, L1ctlCcchMode ccch_mode, GsmRxLev rxlev_exp) := {
header := t_L1ctlHeader(L1CTL_FBSB_REQ),
ul_info := omit,
+ ul_info_tbf := omit,
payload := {
fbsb_req := {
arfcn := arfcn,
@@ -370,6 +381,7 @@
link_id := ts_RslLinkID_DCCH(0),
padding := '0000'O
},
+ ul_info_tbf := omit,
payload := {
rach_req := {
ra := ra,
@@ -386,6 +398,7 @@
link_id := ts_RslLinkID_DCCH(0),
padding := '0000'O
},
+ ul_info_tbf := omit,
payload := {
dm_est_req := {
tsc := tsc,
@@ -405,6 +418,7 @@
link_id := ts_RslLinkID_DCCH(0),
padding := '0000'O
},
+ ul_info_tbf := omit,
payload := {
other := ''O
}
@@ -417,6 +431,7 @@
link_id := link_id,
padding := '0000'O
},
+ ul_info_tbf := omit,
payload := {
other := l2_data
}
@@ -425,6 +440,7 @@
template L1ctlUlMessage t_L1CTL_TBF_CFG_REQ(boolean is_uplink, TfiUsfArr tfi_usf) := {
header := t_L1ctlHeader(L1CTL_TBF_CFG_REQ),
ul_info := omit,
+ ul_info_tbf := omit,
payload := {
tbf_cfg_req := {
tbf_nr := 0,
@@ -448,6 +464,18 @@
}
};
+ template L1ctlUlMessage t_L1CTL_DATA_TBF_REQ(octetstring l2_data, uint8_t tbf_nr := 0) := {
+ header := t_L1ctlHeader(L1CTL_DATA_TBF_REQ),
+ ul_info := omit,
+ ul_info_tbf := {
+ tbf_nr := tbf_nr,
+ padding := '000000'O
+ },
+ payload := {
+ other := l2_data
+ }
+ }
+
/* for matching against incoming RACH_CONF */
template L1ctlDlMessage t_L1CTL_RACH_CONF := {
header := t_L1ctlHeader(L1CTL_RACH_CONF),