Change in osmo-ttcn3-hacks[master]: CSN1: Support enc/dec of Packet Measurement related messages

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Jun 28 08:45:13 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24750 )

Change subject: CSN1: Support enc/dec of Packet Measurement related messages
......................................................................

CSN1: Support enc/dec of Packet Measurement related messages

Related: SYS#5303
Change-Id: I5567a0d86c70d67e2012ba284146952a40c279d7
---
M library/RLCMAC_CSN1_Templates.ttcn
M library/RLCMAC_CSN1_Types.ttcn
2 files changed, 210 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/library/RLCMAC_CSN1_Templates.ttcn b/library/RLCMAC_CSN1_Templates.ttcn
index 39f240b..254983a 100644
--- a/library/RLCMAC_CSN1_Templates.ttcn
+++ b/library/RLCMAC_CSN1_Templates.ttcn
@@ -158,6 +158,106 @@
 		}
 	};
 
+	/* TS 44.060 sec 11.2.9 */
+	template (value) NCMeasurement ts_NCMeasurement(uint6_t frequency_n, BIT6 bsic, uint6_t rxlev)
+	:= {
+		frequency_n := frequency_n,
+		bsic_n_presence := '1'B,
+		bsic_n := bsic,
+		rxlev_n := rxlev
+	};
+	template (value) NCMeasurementReport ts_NCMeasurementReport(BIT1 nc_mode,
+							    uint6_t rxlev_serving_cell,
+							    template (value) NCMeasurementList nc_meas_list := {})
+	:= {
+		nc_mode := nc_mode,
+		rxlev_serving_cell := rxlev_serving_cell,
+		zero := '0'B,
+		num_nc_measurements := 0, /* automatically updated */
+		nm_measurements := nc_meas_list
+	};
+	template RlcmacUlCtrlMsg ts_RlcMacUlCtrl_PKT_MEAS_REPORT(template (value) GprsTlli tlli,
+								template (value) NCMeasurementReport nc_meas_rep)
+	:= {
+		msg_type := PACKET_MEASUREMENT_REPORT,
+		u := {
+			meas_report := {
+				tlli := tlli,
+				psi5_change_mark_presence := '0'B,
+				psi5_change_mark := omit,
+				additions_99 := '0'B,
+				nc_meas_report := nc_meas_rep
+			}
+		}
+	};
+
+	/* TS 44.060 sec 11.2.9b */
+	template RepeatedAddFrequencyItem tr_RepeatedAddFrequencyItem(template (present) uint10_t start_frequency := ?,
+								      template (present) uint6_t bsic := ?)
+	:= {
+		presence := '1'B,
+		item := {
+			start_frequency := start_frequency,
+			bsic := bsic,
+			cell_sel_par_present := ?,
+			cell_sel_par := *,
+			nr_of_frequencies := 0,
+			freq_diff_length := ?
+			/* TODO: support Frequency diff list */
+		}
+	};
+	template NCFrequencyList tr_NCFrequencyList(template FreqIndexList removed_freq_index := *, template RepeatedAddFrequencyItemList repeated_add_frequency := *)
+	:= {
+		removed_freq_present := ?,
+		nr_of_removed_freq := *,
+		removed_freq_index := removed_freq_index,
+		repeated_add_frequency := repeated_add_frequency,
+		repeated_add_frequency_term := '0'B
+	};
+	template NCMeasurementParameters tr_NCMeasurementParameters(template (present) NetworkControlOrder nco := ?,
+								    template uint3_t nc_non_drx_period := *,
+								    template uint3_t nc_reporting_period_i := *,
+								    template uint3_t nc_reporting_period_t := *,
+								    template NCFrequencyList nc_freq_list := *)
+	:= {
+		nco := nco,
+		nc_period_present := ?,
+		nc_non_drx_period := nc_non_drx_period,
+		nc_reporting_period_i := nc_reporting_period_i,
+		nc_reporting_period_t := nc_reporting_period_t,
+		nc_freq_list_present := ?,
+		nc_freq_list := nc_freq_list
+	};
+	/* This template is used by osmo-pcu to reset the GSM Neighbour Cell List of the MS */
+	template (value) NCMeasurementParameters ts_NCMeasurementParametersRESET
+	:= {
+		nco := NC_RESET,
+		nc_period_present := '0'B,
+		nc_non_drx_period := omit,
+		nc_reporting_period_i := omit,
+		nc_reporting_period_t := omit,
+		nc_freq_list_present := '0'B,
+		nc_freq_list := omit
+	};
+	template RlcmacDlCtrlMsg tr_RlcMacDlCtrl_PKT_MEAS_ORDER(template (present) GlobalTfiOrTlli tfi_or_tlli := ?,
+								template (present) uint3_t pmo_index := ?,
+								template (present) uint3_t pmo_count := ?,
+								template (present) NCMeasurementParameters nc_meas_param := ?)
+	:= {
+		msg_type := PACKET_MEASUREMENT_ORDER,
+		u := {
+			meas_order := {
+				page_mode := ?,
+				tfi_or_tlli := tfi_or_tlli,
+				pmo_index := pmo_index,
+				pmo_count := pmo_count,
+				nc_meas_param_present := '1'B,
+				nc_meas_param := nc_meas_param,
+				zero := '0'B
+			}
+		}
+	};
+
 	/* TS 44.060 sec 11.2.9e */
 	template RlcmacDlCtrlMsg tr_RlcMacDlCtrl_PKT_NEIGH_CELL_DATA(template (present) GlobalTfi tfi := ?,
 								     template (present) uint5_t container_index := ?)
diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index 0dd8a8b..d9a5662 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -163,6 +163,80 @@
 		variant (tbf_starting_time) "PRESENCE(tbf_starting_time_present = '1'B)"
 	};
 
+	/* 11.2.9b Packet Measurement Order */
+	type enumerated NetworkControlOrder {
+		NC_0		('00'B),
+		NC_1		('01'B),
+		NC_2		('10'B),
+		NC_RESET	('11'B)
+	} with { variant "FIELDLENGTH(2)" };
+	type record CellSelection {
+		BIT1	cell_barr_access_2,
+		BIT1 	exc_acc,
+		BIT1	same_ra_as_serving_cell,
+		BIT1	gprs_rxlev_access_min_present ('0'B),
+		BIT1	gprs_temporary_offset_present ('0'B),
+		BIT1	gprs_reselct_offset_present ('0'B),
+		BIT1	hcs_params_present ('0'B),
+		BIT1	si13_pbcch_location_present ('0'B)
+		/* TODO: add optional parameters above^ */
+	};
+	type record AddFrequency {
+		uint10_t		start_frequency,
+		uint6_t			bsic,
+		BIT1			cell_sel_par_present,
+		CellSelection		cell_sel_par optional,
+		uint5_t			nr_of_frequencies,
+		uint3_t			freq_diff_length
+		/* TODO: support Frequency diff list */
+	} with {
+		variant (cell_sel_par) "PRESENCE(cell_sel_par_present = '1'B)"
+	};
+	type record RepeatedAddFrequencyItem {
+		BIT1			presence,
+		AddFrequency		item
+	} with { variant "PRESENCE(presence = '1'B)" };
+	type record of uint6_t FreqIndexList;
+	type record of RepeatedAddFrequencyItem RepeatedAddFrequencyItemList;
+	type record NCFrequencyList {
+		BIT1			removed_freq_present,
+		uint5_t			nr_of_removed_freq optional,
+		FreqIndexList		removed_freq_index optional,
+		RepeatedAddFrequencyItemList repeated_add_frequency optional,
+		BIT1			repeated_add_frequency_term ('0'B)
+	} with {
+		variant (nr_of_removed_freq) "PRESENCE(removed_freq_present = '1'B)"
+		variant (removed_freq_index) "PRESENCE(removed_freq_present = '1'B)"
+		variant (nr_of_removed_freq) "LENGTHTO(removed_freq_index)-1"
+		variant (nr_of_removed_freq) "UNIT(elements)"
+	};
+	type record NCMeasurementParameters {
+		NetworkControlOrder	nco,
+		BIT1			nc_period_present,
+		uint3_t			nc_non_drx_period optional,
+		uint3_t			nc_reporting_period_i optional,
+		uint3_t			nc_reporting_period_t optional,
+		BIT1			nc_freq_list_present,
+		NCFrequencyList		nc_freq_list optional
+	} with {
+		variant (nc_non_drx_period) "PRESENCE(nc_period_present = '1'B)"
+		variant (nc_reporting_period_i) "PRESENCE(nc_period_present = '1'B)"
+		variant (nc_reporting_period_t) "PRESENCE(nc_period_present = '1'B)"
+		variant (nc_freq_list) "PRESENCE(nc_freq_list_present = '1'B)"
+	};
+	type record PacketMeasOrder {
+		PageMode		page_mode,
+		GlobalTfiOrTlli		tfi_or_tlli,
+		uint3_t			pmo_index,
+		uint3_t			pmo_count,
+		BIT1			nc_meas_param_present,
+		NCMeasurementParameters nc_meas_param optional,
+		BIT1			zero('0'B) /*  The value '1' was allocated in an earlier version of the protocol and shall not be used.  */
+		/* TODO: support Additions 98 onwards */
+	} with {
+		variant (nc_meas_param) "PRESENCE(nc_meas_param_present = '1'B)"
+	};
+
 	private type record PktDlAssRelAdditions {
 		BIT1			rel99_presence, // 0/1
 		PktDlAssR99Additions	rel99 optional
@@ -632,6 +706,7 @@
 	/* 11.2.0.1 */
 	type union RlcmacDlCtrlUnion {
 		PacketDlAssignment	dl_assignment,
+		PacketMeasOrder		meas_order,
 		PacketUlAssignment	ul_assignment,
 		PacketPagingReq		paging,
 		PacketUlAckNack		ul_ack_nack,
@@ -647,6 +722,7 @@
 		RlcmacDlCtrlUnion	u
 	} with {
 		variant (u) "CROSSTAG(dl_assignment,	msg_type = PACKET_DL_ASSIGNMENT;
+				      meas_order,	msg_type = PACKET_MEASUREMENT_ORDER;
 				      ul_assignment,	msg_type = PACKET_UL_ASSIGNMENT;
 				      paging,		msg_type = PACKET_PAGING_REQUEST;
 				      ul_ack_nack,	msg_type = PACKET_UL_ACK_NACK;
@@ -759,6 +835,38 @@
 		variant (tlli) "BYTEORDER(first)"
 	};
 
+	/* 11.2.9 Packet Measurement Report */
+	type record NCMeasurement {
+		uint6_t frequency_n,
+		BIT1 bsic_n_presence,
+		BIT6 bsic_n optional,
+		uint6_t rxlev_n
+	} with {
+		variant (bsic_n) "PRESENCE(bsic_n_presence = '1'B)"
+	};
+	type record of NCMeasurement NCMeasurementList;
+	type record NCMeasurementReport {
+		BIT1	nc_mode,
+		uint6_t	rxlev_serving_cell,
+		BIT1 zero ('0'B), /*The value '1' was allocated in an earlier version of the protocol and shall not be used.*/
+		uint3_t	num_nc_measurements,
+		NCMeasurementList nm_measurements
+	} with {
+		variant (num_nc_measurements) "LENGTHTO(nm_measurements)"
+		variant (num_nc_measurements) "UNIT(elements)"
+	};
+	type record PacketMeasReport {
+		GprsTlli		tlli,
+		BIT1	psi5_change_mark_presence,
+		BIT2	psi5_change_mark optional,
+		BIT1	additions_99 ('0'B), /* TODO: 1 -> support Additions 99 onwards */
+		NCMeasurementReport nc_meas_report optional
+	} with {
+		variant (tlli) "BYTEORDER(first)"
+		variant (psi5_change_mark) "PRESENCE(psi5_change_mark_presence = '1'B)"
+		variant (nc_meas_report) "PRESENCE(additions_99 = '0'B)"
+	};
+
 	/* TS 44.060 sec 12.30 MS Radio Access Capability 2
 	 * (for value part, see 3GPP TS 24.008 sec 10.5.5.12a and table 10.5.146) */
 	type union MSRadioAccCap2 {
@@ -844,6 +952,7 @@
 		PacketDlAckNack			dl_ack_nack,
 		EgprsPacketDlAckNack		dl_ack_nack_egprs,
 		PacketUlDummy			ul_dummy,
+		PacketMeasReport		meas_report,
 		PacketResourceReq		resource_req,
 		PacketCellChangeNotification	cell_chg_notif,
 		octetstring			other
@@ -857,6 +966,7 @@
 				      dl_ack_nack,	msg_type = PACKET_DL_ACK_NACK;
 				      dl_ack_nack_egprs, msg_type = PACKET_EGPRS_DL_ACK_NACK;
 				      ul_dummy,		msg_type = PACKET_UL_DUMMY_CTRL;
+				      meas_report,	msg_type = PACKET_MEASUREMENT_REPORT;
 				      resource_req,	msg_type = PACKET_RESOURCE_REQUEST;
 				      cell_chg_notif,	msg_type = PACKET_CELL_CHANGE_NOTIFICATION;
 				      other,		OTHERWISE

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24750
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5567a0d86c70d67e2012ba284146952a40c279d7
Gerrit-Change-Number: 24750
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210628/96af53a5/attachment.htm>


More information about the gerrit-log mailing list