This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: GSM_RR_Types: Add ts_IMM_ASS and ts_MEAS_REP ...................................................................... GSM_RR_Types: Add ts_IMM_ASS and ts_MEAS_REP which allows us to send RR IMMEDIATE ASSIGNMENT (DL/AGCH) and RR MEASUREMENT REPORT (UL/SACCH) messages from tests. Change-Id: Ic75041e84c15c77805ecafb823bf7108920675ca --- M library/GSM_RR_Types.ttcn 1 file changed, 92 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index eed58df..2625a1f 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -139,6 +139,12 @@ RrMessageType message_type } with { variant "" }; + template RrL3Header t_RrL3Header(RrMessageType msg_type) := { + skip_indicator := 0, + rr_protocol_discriminator := 6, + message_type := msg_type + } + type record MaioHsn { } with { variant "" }; @@ -486,6 +492,31 @@ variant (hh) "PRESENCE(presence = '11'B)" }; + type record MeasurementResults { + BIT1 ba_used, + BIT1 dtx_used, + uint6_t rxlev_full_srv_cell, + BIT1 threeg_ba_used, + BIT1 meas_valid, + uint6_t rxlev_sub_srv_cell, + BIT1 si23_ba_used, + uint3_t rxqual_full_srv_cell, + uint3_t rxqual_sub_srv_cell, + uint3_t no_ncell_m, + NcellReports ncell_reports optional + } with { variant (no_ncell_m) "LENGTHTO(ncell_reports)" + variant (no_ncell_m) "UNIT(elements)" + variant "PADDING(yes)" + variant "FIELDLENGTH(16)" + }; + + type record NcellReport { + uint6_t rxlev, + uint5_t bcch_freq, + uint6_t bsic + } with { variant ""}; + type record of NcellReport NcellReports; + /* 9.1.18 */ type record ImmediateAssignment { @@ -497,7 +528,7 @@ TimingAdvance timing_advance, MobileAllocation mobile_allocation, /* TODO: starting time TLV */ - IaRestOctets rest_octets + IaRestOctets rest_octets optional } with { variant (chan_desc) "PRESENCE(ded_or_tbf.tbf = false)" variant (pkt_chan_desc) "PRESENCE(ded_or_tbf.tbf = true)" }; @@ -511,6 +542,11 @@ FeatureIndicator feature_ind, PageMode page_mode, ReqRefWaitInd4 payload + } with { variant "" }; + + /* 9.1.21 */ + type record MeasurementReport { + MeasurementResults meas_res } with { variant "" }; /* 9.1.22 */ @@ -607,6 +643,7 @@ type union RrL3Union { PagingResponse paging_response, + MeasurementReport meas_rep, octetstring other }; @@ -615,8 +652,61 @@ RrL3Union payload } with { variant (payload) "CROSSTAG( paging_response, header.message_type = PAGING_RESPONSE; - + meas_rep, header.message_type = MEASUREMENT_REPORT; other, OTHERWISE; )" } + external function enc_GsmRrL3Message(in GsmRrL3Message msg) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + external function dec_GsmRrL3Message(in octetstring stream) return GsmRrL3Message + with { extension "prototype(convert) decode(RAW)" }; + + + template GsmRrMessage ts_IMM_ASS(uint8_t ra, GsmFrameNumber fn, TimingAdvance ta, + ChannelDescription ch_desc, MobileAllocation ma) := { + header := t_RrHeader(IMMEDIATE_ASSIGNMENT, 0), + payload := { + imm_ass := { + ded_or_tbf := { + spare := '0'B, + tma := false, + downlink := false, + tbf := false + }, + page_mode := PAGE_MODE_NORMAL, + chan_desc := ch_desc, + pkt_chan_desc := omit, + req_ref := f_compute_ReqRef(ra, fn), + timing_advance := ta, + mobile_allocation := ma, + rest_octets := omit + } + } + }; + + template (value) GsmRrL3Message ts_MEAS_REP(boolean valid, uint6_t rxl_f, uint6_t rxl_s, + uint3_t rxq_f, uint3_t rxq_s, + template (omit) NcellReports reps) := { + header := t_RrL3Header(MEASUREMENT_REPORT), + payload := { + meas_rep := { + meas_res := { + ba_used := '0'B, + dtx_used := '0'B, + rxlev_full_srv_cell := rxl_f, + threeg_ba_used := '0'B, + meas_valid := bool2bit(valid), + rxlev_sub_srv_cell := rxl_s, + si23_ba_used := '0'B, + rxqual_full_srv_cell := rxq_f, + rxqual_sub_srv_cell := rxq_s, + no_ncell_m := 0, + ncell_reports := reps + } + } + } + }; + + + } with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/6653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic75041e84c15c77805ecafb823bf7108920675ca Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder