Allow Setting IuUP_Cfg from test using RTP_Emulation
Change-Id: I4e8296dae40277be51974338bc0d21c939eec149
diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn
index 1bb2bb2..b649e44 100644
--- a/library/IuUP_Emulation.ttcn
+++ b/library/IuUP_Emulation.ttcn
@@ -26,6 +26,7 @@
/* IPTI value in number of ITIs for the corresponding RFCI */
uint8_t ipti
};
+type record of IuUP_RabFlowCombination IuUP_RabFlowCombinationList;
template (value) IuUP_RabFlowCombination t_IuUP_RFC(IuUP_RFCI rfci, RecOfU8 subflow_bits, uint8_t ipti) := {
rfci := rfci,
@@ -37,21 +38,50 @@
template (value) IuUP_RabFlowCombination t_IuUP_RFC_AMR_SID(IuUP_RFCI rfci) := t_IuUP_RFC(rfci, {34, 0, 0}, 7);
template (value) IuUP_RabFlowCombination t_IuUP_RFC_AMR_NO_DATA(IuUP_RFCI rfci) := t_IuUP_RFC(rfci, {0, 0, 0}, 1);
+
+const IuUP_RabFlowCombinationList c_IuUP_Config_RabFlowCombination_def := {
+ {
+ rfci := 0,
+ sub_flow_bits := {81, 103, 60},
+ ipti := 1
+ }, {
+ rfci := 1,
+ sub_flow_bits := {34, 0, 0},
+ ipti := 7
+ }, {
+ rfci := 2,
+ sub_flow_bits := {0, 0, 0},
+ ipti := 1
+ }
+};
type record IuUP_Config {
/* actively send INIT (true) or only passively respond (false) */
boolean active_init,
boolean data_pdu_type_0,
/* RAB Flow Combinations */
- record of IuUP_RabFlowCombination rab_flow_combs
+ IuUP_RabFlowCombinationList rab_flow_combs
};
+template (value) IuUP_Config t_IuUP_Config(boolean active_init := true,
+ boolean data_pdu_type_0 := true,
+ template (value) IuUP_RabFlowCombinationList rab_flow_combs :=
+ c_IuUP_Config_RabFlowCombination_def) := {
+ active_init := active_init,
+ data_pdu_type_0 := true,
+ rab_flow_combs := rab_flow_combs
+}
+
+const IuUP_Config c_IuUP_Config_def := {
+ active_init := true,
+ data_pdu_type_0 := true,
+ rab_flow_combs := c_IuUP_Config_RabFlowCombination_def
+}
+
type enumerated IuUP_Em_State {
ST_INIT,
ST_DATA_TRANSFER_READY
};
-
-
type record IuUP_Entity {
IuUP_Config cfg,
IuUP_Em_State state,
@@ -60,12 +90,8 @@
IuUP_PDU pending_tx_pdu optional
};
-template (value) IuUP_Entity t_IuUP_Entity(boolean act_init) := {
- cfg := {
- active_init := act_init,
- data_pdu_type_0 := true,
- rab_flow_combs := { t_IuUP_RFC_AMR_12_2(0), t_IuUP_RFC_AMR_SID(1), t_IuUP_RFC_AMR_NO_DATA(2) }
- },
+template (value) IuUP_Entity t_IuUP_Entity(template (value) IuUP_Config cfg) := {
+ cfg := cfg,
state := ST_INIT,
tx_next_frame_nr := 0,
rx_last_frame_nr := omit,