aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-10-20 19:10:04 +0700
committerfixeria <vyanitskiy@sysmocom.de>2022-10-21 10:35:27 +0000
commit150d6d1bdc6d870e9a28720b9939cb6797aeef91 (patch)
tree385382b0e31b11fb703a61ead667544f17adb632 /library
parentc6c194323bb0bdf1093ecde28c74dcc26ea27a88 (diff)
library: move IA/IAR Rest Octets to GSM_RestOctets.ttcn
Diffstat (limited to 'library')
-rw-r--r--library/GSM_RR_Types.ttcn247
-rw-r--r--library/GSM_RestOctets.ttcn264
-rw-r--r--library/L1CTL_PortType.ttcn1
-rw-r--r--library/LAPDm_RAW_PT.ttcn1
4 files changed, 267 insertions, 246 deletions
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 335e2902..b62dcb92 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -15,6 +15,7 @@ module GSM_RR_Types {
import from General_Types all;
import from Osmocom_Types all;
import from GSM_Types all;
+ import from GSM_RestOctets all;
import from RLCMAC_CSN1_Types all;
import from MobileL3_CommonIE_Types all;
import from MobileL3_RRM_Types all;
@@ -421,224 +422,6 @@ module GSM_RR_Types {
uint3_t non_drx_timer
} with { variant "" };
- /* 44.018 10.5.2.16 */
- type record IaRestOctHL {
- uint6_t freq_par_len,
- BIT2 padding ('00'B) optional,
- uint6_t maio optional,
- octetstring mobile_allocation optional
- } with {
- variant (freq_par_len) "LENGTHTO(mobile_allocation,maio,padding)"
-/*
- variant (padding) "PRESENCE(freq_par_len != 0)"
- variant (maio) "PRESENCE(freq_par_len != 0)"
- variant (mobile_allocation) "PRESENCE(freq_par_len != 0)"
-*/
- };
- type record SecondPartAssign {
- BIT1 r99, /* L / H */
- BIT1 presence optional,
- BIT5 ext_ra optional
- } with {
- variant (r99) "CSN.1 L/H"
- variant (presence) "PRESENCE(r99 = '1'B)" /* H */
- variant (ext_ra) "PRESENCE(presence = '1'B)"
- /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488 */
- variant (ext_ra) "BYTEORDER(last)" // FIXME: should be first
- };
- type union PacketUlDlAssignUnion {
- PacketUlAssign ul,
- PacketDlAssign dl
- };
- type record PacketUlDlAssign {
- BIT1 ass_disc,
- PacketUlDlAssignUnion ass
- } with {
- variant (ass) "CROSSTAG(dl, ass_disc = '1'B; ul, ass_disc = '0'B)"
- };
- type union PacketAssignUnion {
- SecondPartAssign spa,
- PacketUlDlAssign uldl
- };
- type record IaRestOctHH {
- /* Packet Assignment discriminator:
- * Packet Uplink / Downlink Assignment (0)
- * Second Part Packet Assignment (1) */
- BIT1 pa_disc,
- PacketAssignUnion pa
- } with {
- variant (pa) "CROSSTAG(spa, pa_disc = '1'B; uldl, pa_disc = '0'B)"
- };
- type record TbfStartingTime {
- uint5_t t1,
- uint6_t t3,
- uint5_t t2
- };
- type record PacketUlAssignDyn {
- uint5_t tfi_assignment,
- BIT1 polling,
- BIT1 spare ('0'B),
- uint3_t usf,
- BIT1 usf_granularity,
- BIT1 p0_present,
- uint4_t p0 optional,
- BIT1 pr_mode optional,
- ChCodingCommand ch_coding_cmd,
- BIT1 tlli_block_chan_coding,
- BIT1 alpha_present,
- uint4_t alpha optional,
- uint5_t gamma,
- BIT1 ta_index_present,
- uint4_t ta_index optional,
- BIT1 tbf_starting_time_present,
- TbfStartingTime tbf_starting_time optional
- } with {
- variant (p0) "PRESENCE(p0_present = '1'B)"
- variant (pr_mode) "PRESENCE(p0_present = '1'B)"
- variant (alpha) "PRESENCE(alpha_present = '1'B)"
- variant (ta_index) "PRESENCE(ta_index_present = '1'B)"
- variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
- };
- type record PacketUlAssignSgl {
- BIT1 alpha_present,
- uint4_t alpha optional,
- uint5_t gamma,
- BIT2 padding ('01'B),
- TbfStartingTime tbf_starting_time
- /* TODO: P0 / PR_MODE */
- } with {
- variant (alpha) "PRESENCE(alpha_present = '1'B)"
- };
- type record PacketUlAssign {
- BIT1 presence,
- PacketUlAssignDyn dynamic optional,
- PacketUlAssignSgl single optional
- /* TODO: Estended RA, PFI */
- } with {
- variant (dynamic) "PRESENCE(presence = '1'B)"
- variant (single) "PRESENCE(presence = '0'B)"
- };
- type record PacketDlAssG1 {
- uint5_t tfi_assignment,
- BIT1 rlc_mode,
- BIT1 alpha_present,
- uint4_t alpha optional,
- uint5_t gamma,
- BIT1 polling,
- BIT1 ta_valid
- } with { variant "" };
- type record PacketDlAssign {
- GprsTlli tlli,
- BIT1 group1_present,
- PacketDlAssG1 group1 optional,
- BIT1 ta_index_present,
- uint4_t ta_index optional,
- BIT1 tbf_starting_time_present,
- TbfStartingTime tbf_starting_time optional,
- BIT1 p0_present,
- uint4_t p0 optional,
- BIT1 pr_mode optional
- /* TODO: EGPRS window size, etc. */
- } with {
- variant (group1) "PRESENCE(group1_present = '1'B)"
- variant (ta_index) "PRESENCE(ta_index_present = '1'B)"
- variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
- variant (p0) "PRESENCE(p0_present = '1'B)"
- variant (pr_mode) "PRESENCE(p0_present = '1'B)"
- };
- type record IaRestOctLL {
- BIT1 compressed_irat_ho_info_ind
- } with {
- variant (compressed_irat_ho_info_ind) "CSN.1 L/H"
- };
- type record EgprsUlAssignDyn {
- uint5_t tfi_assignment,
- BIT1 polling,
- BIT1 spare ('0'B),
- uint3_t usf,
- BIT1 usf_granularity,
- BIT1 p0_present,
- uint4_t p0 optional,
- BIT1 pr_mode optional,
- EgprsChCodingCommand egprs_ch_coding_cmd,
- BIT1 tlli_block_chan_coding,
- BIT1 bep_period2_present,
- BIT4 bep_period2 optional,
- BIT1 resegment,
- EgprsWindowSize egprs_window_size,
- BIT1 alpha_present,
- uint4_t alpha optional,
- uint5_t gamma,
- BIT1 ta_index_present,
- uint4_t ta_index optional,
- BIT1 tbf_starting_time_present,
- TbfStartingTime tbf_starting_time optional
- /* TODO: Additions for Rel-7 */
- } with {
- variant (p0) "PRESENCE(p0_present = '1'B)"
- variant (pr_mode) "PRESENCE(p0_present = '1'B)"
- variant (bep_period2) "PRESENCE(bep_period2_present = '1'B)"
- variant (alpha) "PRESENCE(alpha_present = '1'B)"
- variant (ta_index) "PRESENCE(ta_index_present = '1'B)"
- variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
- };
- type record EgprsUlAssignMultiblock {
- BIT1 alpha_present,
- uint4_t alpha optional,
- uint5_t gamma,
- TbfStartingTime tbf_starting_time,
- BIT2 nr_radio_blocks_allocated,
- BIT1 p0_present,
- uint4_t p0 optional,
- BIT1 spare ('0'B) optional,
- BIT1 pr_mode optional
- /* TDO: Additions for Rel-6 */
- } with {
- variant (alpha) "PRESENCE(alpha_present = '1'B)"
- variant (p0) "PRESENCE(p0_present = '1'B)"
- variant (spare) "PRESENCE(p0_present = '1'B)"
- variant (pr_mode) "PRESENCE(p0_present = '1'B)"
- };
- /* 3GPP TS 44.018 version 13.3.2 10.5.2.16, "EGPRS Packet Uplink Assignment" */
- type record EgprsUlAss {
- BIT5 ext_ra,
- BIT1 ats_present,
- AccessTechnologiesRequestRepetition ats optional,
- BIT1 presence,
- EgprsUlAssignDyn dynamic optional,
- EgprsUlAssignMultiblock multiblock optional
- } with {
- variant (ats) "PRESENCE(ats_present = '1'B)"
- variant (dynamic) "PRESENCE(presence = '1'B)"
- variant (multiblock) "PRESENCE(presence = '0'B)"
- /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488 */
- variant (ext_ra) "BYTEORDER(last)" // FIXME: should be first
- };
-
- type octetstring MblkDlAss; /* TODO */
- type record IaRestOctLH {
- BIT2 presence,
- EgprsUlAss egprs_ul optional,
- MblkDlAss multiblock_dl_ass optional
- } with {
- variant (egprs_ul) "PRESENCE(presence = '00'B)"
- variant (multiblock_dl_ass) "PRESENCE(presence = '01'B)"
- };
- type record IaRestOctets {
- BIT2 presence,
- IaRestOctLL ll optional,
- IaRestOctLH lh optional,
- IaRestOctHL hl optional,
- IaRestOctHH hh optional
- } with {
- variant (presence) "CSN.1 L/H"
- variant (ll) "PRESENCE(presence = '00'B)"
- variant (lh) "PRESENCE(presence = '01'B)"
- variant (hl) "PRESENCE(presence = '10'B)"
- variant (hh) "PRESENCE(presence = '11'B)"
- variant "PADDING(yes), PADDING_PATTERN('00101011'B)"
- };
-
type record MeasurementResults {
BIT1 ba_used,
BIT1 dtx_used,
@@ -744,34 +527,6 @@ module GSM_RR_Types {
IARRestOctets rest_octets
} with { variant "" };
- /* 10.5.2.17 IAR (Immediate Assignment Reject) Rest Octets */
- type record IARRestOctets {
- ExtRAList ext_ra_list,
- BIT1 rel13_ind, // L/H
- uint3_t rcc optional
- /* Addition in Rel-15: PEO IMM Cell Group Details struct */
- } with {
- variant (rel13_ind) "CSN.1 L/H"
- variant (rcc) "PRESENCE(rel13_ind = '1'B)"
-
- /* The TITAN's RAW encoder generates an octet-aligned octetstring,
- * so we should make sure that unused bits contain proper padding. */
- variant "PADDING(yes), PADDING_PATTERN('00101011'B)"
- };
-
- /* Optional extended RA: 0 | 1 < Extended RA 1 : bit (5) > */
- type record ExtRAOpt {
- BIT1 presence, // L/H
- BIT5 ext_ra optional
- } with {
- variant (presence) "CSN.1 L/H"
- variant (ext_ra) "PRESENCE(presence = '1'B)"
- /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488 */
- variant (ext_ra) "BYTEORDER(last)"
- };
-
- type record length(4) of ExtRAOpt ExtRAList;
-
/* 9.1.21 */
type record MeasurementReport {
MeasurementResults meas_res
diff --git a/library/GSM_RestOctets.ttcn b/library/GSM_RestOctets.ttcn
index 94dce04c..2be96a48 100644
--- a/library/GSM_RestOctets.ttcn
+++ b/library/GSM_RestOctets.ttcn
@@ -16,6 +16,270 @@ module GSM_RestOctets {
import from General_Types all;
import from Osmocom_Types all;
import from RLCMAC_CSN1_Types all;
+import from GSM_Types all;
+
+/* 10.5.2.16 IA (Immediate Assignment) Rest Octets */
+type record IaRestOctets {
+ BIT2 presence,
+ IaRestOctLL ll optional,
+ IaRestOctLH lh optional,
+ IaRestOctHL hl optional,
+ IaRestOctHH hh optional
+} with {
+ variant (presence) "CSN.1 L/H"
+ variant (ll) "PRESENCE(presence = '00'B)"
+ variant (lh) "PRESENCE(presence = '01'B)"
+ variant (hl) "PRESENCE(presence = '10'B)"
+ variant (hh) "PRESENCE(presence = '11'B)"
+
+ /* The TITAN's RAW encoder generates an octet-aligned octetstring,
+ * so we should make sure that unused bits contain proper padding. */
+ variant "PADDING(yes), PADDING_PATTERN('00101011'B)"
+};
+
+type record IaRestOctLL {
+ BIT1 compressed_irat_ho_info_ind
+} with {
+ variant (compressed_irat_ho_info_ind) "CSN.1 L/H"
+};
+
+type record IaRestOctLH {
+ BIT2 presence,
+ EgprsUlAss egprs_ul optional,
+ octetstring multiblock_dl_ass optional /* TODO */
+} with {
+ variant (egprs_ul) "PRESENCE(presence = '00'B)"
+ variant (multiblock_dl_ass) "PRESENCE(presence = '01'B)"
+};
+
+/* EGPRS Packet Uplink Assignment */
+type record EgprsUlAss {
+ BIT5 ext_ra,
+ BIT1 ats_present,
+ AccessTechnologiesRequestRepetition ats optional,
+ BIT1 presence,
+ EgprsUlAssignDyn dynamic optional,
+ EgprsUlAssignMultiblock multiblock optional
+} with {
+ variant (ats) "PRESENCE(ats_present = '1'B)"
+ variant (dynamic) "PRESENCE(presence = '1'B)"
+ variant (multiblock) "PRESENCE(presence = '0'B)"
+ /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488 */
+ variant (ext_ra) "BYTEORDER(last)" // FIXME: should be first
+};
+
+type record EgprsUlAssignDyn {
+ uint5_t tfi_assignment,
+ BIT1 polling,
+ BIT1 spare ('0'B),
+ uint3_t usf,
+ BIT1 usf_granularity,
+ BIT1 p0_present,
+ uint4_t p0 optional,
+ BIT1 pr_mode optional,
+ EgprsChCodingCommand egprs_ch_coding_cmd,
+ BIT1 tlli_block_chan_coding,
+ BIT1 bep_period2_present,
+ BIT4 bep_period2 optional,
+ BIT1 resegment,
+ EgprsWindowSize egprs_window_size,
+ BIT1 alpha_present,
+ uint4_t alpha optional,
+ uint5_t gamma,
+ BIT1 ta_index_present,
+ uint4_t ta_index optional,
+ BIT1 tbf_starting_time_present,
+ TbfStartingTime tbf_starting_time optional
+ /* TODO: Additions for Rel-7 */
+} with {
+ variant (p0) "PRESENCE(p0_present = '1'B)"
+ variant (pr_mode) "PRESENCE(p0_present = '1'B)"
+ variant (bep_period2) "PRESENCE(bep_period2_present = '1'B)"
+ variant (alpha) "PRESENCE(alpha_present = '1'B)"
+ variant (ta_index) "PRESENCE(ta_index_present = '1'B)"
+ variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
+};
+
+type record EgprsUlAssignMultiblock {
+ BIT1 alpha_present,
+ uint4_t alpha optional,
+ uint5_t gamma,
+ TbfStartingTime tbf_starting_time,
+ BIT2 nr_radio_blocks_allocated,
+ BIT1 p0_present,
+ uint4_t p0 optional,
+ BIT1 spare ('0'B) optional,
+ BIT1 pr_mode optional
+ /* TDO: Additions for Rel-6 */
+} with {
+ variant (alpha) "PRESENCE(alpha_present = '1'B)"
+ variant (p0) "PRESENCE(p0_present = '1'B)"
+ variant (spare) "PRESENCE(p0_present = '1'B)"
+ variant (pr_mode) "PRESENCE(p0_present = '1'B)"
+};
+
+type record IaRestOctHL {
+ uint6_t freq_par_len,
+ BIT2 padding ('00'B) optional,
+ uint6_t maio optional,
+ octetstring mobile_allocation optional
+} with {
+ variant (freq_par_len) "LENGTHTO(mobile_allocation,maio,padding)"
+/*
+ variant (padding) "PRESENCE(freq_par_len != 0)"
+ variant (maio) "PRESENCE(freq_par_len != 0)"
+ variant (mobile_allocation) "PRESENCE(freq_par_len != 0)"
+*/
+};
+
+type record IaRestOctHH {
+ /* Packet Assignment discriminator:
+ * Packet Uplink / Downlink Assignment (0)
+ * Second Part Packet Assignment (1) */
+ BIT1 pa_disc,
+ PacketAssignUnion pa
+} with {
+ variant (pa) "CROSSTAG(spa, pa_disc = '1'B; uldl, pa_disc = '0'B)"
+};
+
+type union PacketAssignUnion {
+ SecondPartAssign spa,
+ PacketUlDlAssign uldl
+};
+
+type record SecondPartAssign {
+ BIT1 r99, /* L / H */
+ BIT1 presence optional,
+ BIT5 ext_ra optional
+} with {
+ variant (r99) "CSN.1 L/H"
+ variant (presence) "PRESENCE(r99 = '1'B)" /* H */
+ variant (ext_ra) "PRESENCE(presence = '1'B)"
+ /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488 */
+ variant (ext_ra) "BYTEORDER(last)" // FIXME: should be first
+};
+
+type record PacketUlDlAssign {
+ BIT1 ass_disc,
+ PacketUlDlAssignUnion ass
+} with {
+ variant (ass) "CROSSTAG(dl, ass_disc = '1'B; ul, ass_disc = '0'B)"
+};
+
+type union PacketUlDlAssignUnion {
+ PacketUlAssign ul,
+ PacketDlAssign dl
+};
+
+type record PacketUlAssign {
+ BIT1 presence,
+ PacketUlAssignDyn dynamic optional,
+ PacketUlAssignSgl single optional
+ /* TODO: Estended RA, PFI */
+} with {
+ variant (dynamic) "PRESENCE(presence = '1'B)"
+ variant (single) "PRESENCE(presence = '0'B)"
+};
+
+type record PacketUlAssignDyn {
+ uint5_t tfi_assignment,
+ BIT1 polling,
+ BIT1 spare ('0'B),
+ uint3_t usf,
+ BIT1 usf_granularity,
+ BIT1 p0_present,
+ uint4_t p0 optional,
+ BIT1 pr_mode optional,
+ ChCodingCommand ch_coding_cmd,
+ BIT1 tlli_block_chan_coding,
+ BIT1 alpha_present,
+ uint4_t alpha optional,
+ uint5_t gamma,
+ BIT1 ta_index_present,
+ uint4_t ta_index optional,
+ BIT1 tbf_starting_time_present,
+ TbfStartingTime tbf_starting_time optional
+} with {
+ variant (p0) "PRESENCE(p0_present = '1'B)"
+ variant (pr_mode) "PRESENCE(p0_present = '1'B)"
+ variant (alpha) "PRESENCE(alpha_present = '1'B)"
+ variant (ta_index) "PRESENCE(ta_index_present = '1'B)"
+ variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
+};
+
+type record PacketUlAssignSgl {
+ BIT1 alpha_present,
+ uint4_t alpha optional,
+ uint5_t gamma,
+ BIT2 padding ('01'B),
+ TbfStartingTime tbf_starting_time
+ /* TODO: P0 / PR_MODE */
+} with {
+ variant (alpha) "PRESENCE(alpha_present = '1'B)"
+};
+
+type record PacketDlAssign {
+ GprsTlli tlli,
+ BIT1 group1_present,
+ PacketDlAssG1 group1 optional,
+ BIT1 ta_index_present,
+ uint4_t ta_index optional,
+ BIT1 tbf_starting_time_present,
+ TbfStartingTime tbf_starting_time optional,
+ BIT1 p0_present,
+ uint4_t p0 optional,
+ BIT1 pr_mode optional
+ /* TODO: EGPRS window size, etc. */
+} with {
+ variant (group1) "PRESENCE(group1_present = '1'B)"
+ variant (ta_index) "PRESENCE(ta_index_present = '1'B)"
+ variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
+ variant (p0) "PRESENCE(p0_present = '1'B)"
+ variant (pr_mode) "PRESENCE(p0_present = '1'B)"
+};
+
+type record PacketDlAssG1 {
+ uint5_t tfi_assignment,
+ BIT1 rlc_mode,
+ BIT1 alpha_present,
+ uint4_t alpha optional,
+ uint5_t gamma,
+ BIT1 polling,
+ BIT1 ta_valid
+} with { variant "" };
+
+type record TbfStartingTime {
+ uint5_t t1,
+ uint6_t t3,
+ uint5_t t2
+};
+
+/* 10.5.2.17 IAR (Immediate Assignment Reject) Rest Octets */
+type record IARRestOctets {
+ ExtRAList ext_ra_list,
+ BIT1 rel13_ind, // L/H
+ uint3_t rcc optional
+ /* Addition in Rel-15: PEO IMM Cell Group Details struct */
+} with {
+ variant (rel13_ind) "CSN.1 L/H"
+ variant (rcc) "PRESENCE(rel13_ind = '1'B)"
+
+ /* The TITAN's RAW encoder generates an octet-aligned octetstring,
+ * so we should make sure that unused bits contain proper padding. */
+ variant "PADDING(yes), PADDING_PATTERN('00101011'B)"
+};
+
+/* Optional extended RA: 0 | 1 < Extended RA 1 : bit (5) > */
+type record length(4) of ExtRAOpt ExtRAList;
+type record ExtRAOpt {
+ BIT1 presence, // L/H
+ BIT5 ext_ra optional
+} with {
+ variant (presence) "CSN.1 L/H"
+ variant (ext_ra) "PRESENCE(presence = '1'B)"
+ /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488 */
+ variant (ext_ra) "BYTEORDER(last)"
+};
/* 10.5.2.33b SI 2quater Rest Octets */
type record SI2quaterRestOctets {
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 80fa0743..e5217307 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -17,6 +17,7 @@ module L1CTL_PortType {
import from Osmocom_Types all;
import from GSM_Types all;
import from GSM_RR_Types all;
+ import from GSM_RestOctets all;
import from L1CTL_PortType_CtrlFunct all;
type record L1CTL_connect {
diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn
index 946da676..9630df0e 100644
--- a/library/LAPDm_RAW_PT.ttcn
+++ b/library/LAPDm_RAW_PT.ttcn
@@ -14,6 +14,7 @@
module LAPDm_RAW_PT {
import from GSM_Types all;
import from GSM_RR_Types all;
+ import from GSM_RestOctets all;
import from Osmocom_Types all;
import from L1CTL_Types all;
import from L1CTL_PortType all;