library: move IA/IAR Rest Octets to GSM_RestOctets.ttcn

Change-Id: Icd96fc461e37d1346950a4fa158e0421bd7330c5
This commit is contained in:
Vadim Yanitskiy 2022-10-20 19:10:04 +07:00 committed by fixeria
parent c6c194323b
commit 150d6d1bdc
8 changed files with 271 additions and 248 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -16,6 +16,7 @@ import from General_Types all;
import from Osmocom_Types all;
import from GSM_Types all;
import from GSM_RR_Types all;
import from GSM_RestOctets all;
import from RLCMAC_CSN1_Types all;
import from RLCMAC_CSN1_Templates all;

View File

@ -22,6 +22,7 @@ import from General_Types all;
import from Osmocom_Types all;
import from GSM_Types all;
import from GSM_RR_Types all;
import from GSM_RestOctets all;
import from Osmocom_VTY_Functions all;
import from TELNETasp_PortType all;

View File

@ -49,7 +49,7 @@ FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn"
gen_links $DIR $FILES
DIR=../library
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc "
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn GSM_RestOctets.ttcn Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc "
FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn "
FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Emulation.ttcnpp "
FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "

View File

@ -39,7 +39,7 @@ FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types
gen_links $DIR $FILES
DIR=../library
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn GSUP_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc"
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn GSM_RestOctets.ttcn RSL_Types.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn GSUP_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc"
gen_links $DIR $FILES
ignore_pp_results