CSN1: Support enc/dec of Packet Measurement related messages

Related: SYS#5303
Change-Id: I5567a0d86c70d67e2012ba284146952a40c279d7
This commit is contained in:
Pau Espin 2021-06-17 17:07:33 +02:00
parent 0d6fd3eff2
commit 52c5485462
2 changed files with 210 additions and 0 deletions

View File

@ -158,6 +158,106 @@ module RLCMAC_CSN1_Templates {
}
};
/* 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 := ?)

View File

@ -163,6 +163,80 @@ module RLCMAC_CSN1_Types {
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 @@ module RLCMAC_CSN1_Types {
/* 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 @@ module RLCMAC_CSN1_Types {
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 @@ module RLCMAC_CSN1_Types {
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 @@ module RLCMAC_CSN1_Types {
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 @@ module RLCMAC_CSN1_Types {
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