###########################################
## SCFD file version: 0.5                ##
## Release: FLF/FLC18SP_1712_002         ##
## LTE version: FLF18SP_RADIO_1712_002   ##
## LTE version: FLC18SP_RADIO_1712_002   ##
###########################################



###########
# COMMON: #
###########

####################################################################################################################
# LTE4411 Cat-M1: Connected Mode Mobility Support (Phase-I; Intra-Freq Only)
####################################################################################################################
#OM_LTE_SFS_RNL.19755 Migration of the new mandatory LTE4411 parameters
#Generally mandatory parameter is initialized with its default value.
#If LTE3128/LTE3582/LTE3597 is enabled in the cell (actCatM is set to 'true' and catMProfId refer to one entry of MOC CATMPR), the following new mandatory parameters must be initialized with the default values:
#­	CATMCEL-actIntraFreqHoCatM
#­	CATMPR-t304IntraLteCatM
#­	CATMCEL-actIntraFreqHoCatM
#­	CATMCEL-threshold2IntraFreqCatM
#­	CATMCEL-hysThreshold2IntraFreqCatM
#­	CATMCEL-a2TimeToTriggerIntraFreqCatM
#If LNCEL-threshold2a is configured, CATMCEL-threshold2IntraFreqCatM must be less than or equal to threshold2a.

add_param minor CATMCEL a2TimeToTriggerIntraFreqCatM 480ms
add_param minor CATMCEL actIntraFreqHoCatM false
add_param minor CATMCEL hysThreshold2IntraFreqCatM 0
#add_param minor CATMCEL threshold2IntraFreqCatM 42
add_param minor CATMPR t304IntraLteCatM 2000ms

#v0.3 Add the relation check for threshold2IntraFreqCatM according to updated requirement.
function_relative minor PARAM MRBTS/LNBTS/LNCEL/CATMCEL threshold2IntraFreqCatM = min int ( CONST 42 PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} threshold2a )
#v0.3 end





####################################################################################################################
# LTE4495 Cat-M1: eMBMS Coexistence Support
####################################################################################################################
#OM_LTE_SFS_RNL.20216 Migration of the LTE4495 parameters
#Creation/initialization of new parameters:
#Generally mandatory parameter is initialized with its default value.
#            - CATMCEL - mpdcchStartSfCssCatM
#            - CATMCEL - mpdcchStartSfUessCatM
#If LTE4495 is enabled in the cell (actCatM is set to 'true' and cactMBMS is set to 'true'), the following new mandatory parameter must be initialized with its default value:
#	- CATMCEL - actSf9InvalidLVRBCatM
#Migration of existing parameters/MOCs:
#If LNCEL_FDD - actCatM is set to 'true', SIB-modPeriodCoeff must be configured with (rf512/LNCEL-defPagCyc).

add_param minor CATMCEL actSf9InvalidLVRBCatM true
copy_param minor LNCEL LNCEL defPagCyc tempDefPagCyc
regex_replace minor PARAM MRBTS-*/LNBTS-*/LNCEL-* tempDefPagCyc REPLACE "rf" ALL ""
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/SIB modPeriodCoeff = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/LNCEL_FDD-0 actCatM == CONST "true" ? CONST 512 / PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tempDefPagCyc :
del_param minor LNCEL tempDefPagCyc
del_param minor CATMPR mpdcchStartSfCssCatM
del_param minor CATMPR mpdcchStartSfUessCatM

#v0.4 requirement updated due to PR344983: LTE4495 NIDD dlsDciCch actCatM consistency check need update
#If LNBTS-actMBMS is set to 'true' and in the subordinate LNCEL instances containing MBSFNCEL, and the subordinate LNCEL_FDD instances LNCEL_FDD-actCatM is set to 'true', then LNCEL-dlsDciCch must be set to 'DCI format 1A'. 
#v0.5 added MBSFNCEL check
#dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL dlsDciCch = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} actMBMS == CONST "true" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/LNCEL_FDD-0 actCatM == CONST "true" ? CONST "DCI format 1A" :
dependence_add_param_based_on_MOC_instance minor MBSFNCEL tempMBSFNCELid + 0
move_param minor MBSFNCEL LNCEL tempMBSFNCELid
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL dlsDciCch =  PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} actMBMS == CONST "true" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/LNCEL_FDD-0 actCatM == CONST "true" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tempMBSFNCELid == CONST "0" ? CONST "DCI format 1A" :
del_param minor LNCEL tempMBSFNCELid
#v0.5 end
#v0.4 end





####################################################################################################################
# LTE3897 Flexible intra eNB UL CoMP/LTE3286 Flexible intra ABIA UL CoMP
####################################################################################################################
#OM_LTE_SFS_RNL.17695 During migration to release 18SP following tasks need to be done, no matter if the BTS serves FDD or TDD cells.
#(1) if a CoMP feature has been activated in the previous configuration
#(1.1) if intra-eNB UL CoMP has been activated, i.e. actUlCoMp is set to 'true' then in same Managed Object Instance MO (LNBTS) parameter actCoMp with value "fixedULCoMp" shall be added
#(1.2) if CRAN has been activated, i.e. actCRAN  is set to 'true' then in same Managed Object Instance (LNBTS) parameter actCoMp with value "CRAN" shall be added
#(2) if no CoMP feature has been activated in the previous configuration then in LNBTS parameter actCoMp with value "disabled" shall be added
#Parameter actUlCoMp and actCRAN shall be removed from the original configuration.
#The remodeling of the parameter will also impact the TDD functionality how the feature are being activated.

add_param minor LNBTS actCoMp disabled
del_param minor LNBTS actUlCoMp





####################################################################################################################
# LTE4063 NB-IoT: Online parameters and SIB modification
####################################################################################################################
#OM_LTE_SFS_RNL.19654 Migration of the new mandatory LTE4063 parameter
#Generally mandatory parameter is initialized with its default value.
#If LTE3071/LTE3543/LTE3509 is enabled in the cell (NBIoTProfId refer to one entry of MOC NBIOTPR), the following new mandatory parameter must be initialized with its default value:
#      -  NBIOTPR-tExtendedWaitNB

add_param minor NBIOTPR tExtendedWaitNB 600






###########
# FDD:    #
###########

####################################################################################################################
# LTE4494 Cat-M1: Dynamic Repetition Support
####################################################################################################################
#OM_LTE_SFS_RNL.19961 Migration of the LTE4494 parameters
#Creation/initialization of new parameters:
#Generally mandatory parameter is initialized with its default value.
#If LTE3128/LTE3582/LTE3597 is enabled in the cell (actCatM is set to 'true' and catMProfId refer to one entry of MOC CATMPR, one instance CATMCEL is created), the following new mandatory parameter must be initialized with its default value:
#- CATMCEL- actDynamicRepMpdcchCatM 
#- CATMCEL- actDynamicRepMpdschCatM
#- CATMCEL- actDynamicRepMpuschCatM
#- CATMCEL- actDynamicRepVoLTECatM
#- CATMPR - catMCELevel1->mpdcchMaxNumRepCatM
#Migration of existing parameters/MOCs:
#1) Relocate one mandatory parameter 'actAmcCatM' from MOC CATMPR to MOC CATMCEL; the parameter CATMPR-actAmcCatM shall be deleted.
#Note: 
#For each CATMPR linked to LNCEL (LNCEL_FDD-catMProfId is equal to CATMPR instance id), map the value of CATMPR-actAmcCatM to CATMCEL-actAmcCatM under related LNCEL.
add_param minor CATMCEL actAmcCatM "disabled"
dependence_add_param_based_on_MOC_instance minor CATMPR tempCatMPRid + 0
dependence_copy_param_value_based_on_relation_matching minor PARAM MRBTS/LNBTS/LNCEL/LNCEL_FDD catMProfId PARAM MRBTS/LNBTS/CATMPR tempCatMPRid PARAM actAmcCatM
copy_param_relative minor MRBTS/LNBTS/LNCEL/LNCEL_FDD MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/CATMCEL-0 actAmcCatM actAmcCatM
del_param minor CATMPR tempCatMPRid
del_param minor CATMPR actAmcCatM
del_param minor LNCEL_FDD actAmcCatM

add_param minor CATMCEL actDynamicRepMpdcchCatM false
add_param minor CATMCEL actDynamicRepMpdschCatM false
add_param minor CATMCEL actDynamicRepMpuschCatM false
add_param minor CATMCEL actDynamicRepVoLTECatM false
add_list_param minor CATMPR catMCELevel1 * mpdcchMaxNumRepCatM r8





####################################################################################################################
# LTE4057 Cat-M1: VoLTE Support (Phase-II)
####################################################################################################################
#OM_LTE_SFS_RNL.19834 Migration of the new mandatory LTE4057 parameters
#Generally mandatory parameter is initialized with its default value.
#       -	CATMCEL- actIMSEmerSessCatM
#     	-	CATMPR- maxNumActDrbCatM
#       -	CATMPR- maxNumRrcEmergencyCatM 
#       -	CATMPR- maxNumQci1DrbEmergCatM
#Note:
#	The value of parameter maxNumQci1DrbEmergCatM should not be less than legacy parameter maxNumQci1DrbCatM. 
#	The value of parameter maxNumRrcEmergCatM should not be less than legacy parameter maxNumRrcCatM. 

add_param minor CATMCEL actIMSEmerSessCatM false
add_param minor CATMPR maxNumActDrbCatM 300
function_relative minor PARAM MRBTS/LNBTS/CATMPR maxNumQci1DrbEmergCatM = max int ( CONST 7 PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/CATMPR-${CATMPR} maxNumQci1DrbCatM )
function_relative minor PARAM MRBTS/LNBTS/CATMPR maxNumRrcEmergencyCatM = max int ( CONST 30 PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/CATMPR-${CATMPR} maxNumRrcCatM )





#FZM specific
####################################################################################################################
# LTE3677 Commercial Multefire Support
####################################################################################################################
#OM_LTE_SFS_RNL.19985 Migration of Multefire parameters from FL18 to FL18SP:
#...
#Migration of existing parameters (MOC changes between two releases):
#For all instances of MOC LNCEL configured as Multefire cell (LNBTS_FDD-actMultefire = ‘ture’ and LNCEL/LNCEL_FDD-mfirePrId defined):
#If LNBTS_FDD-actMultefire is true and LNCEL/LNCEL_FDD-mfirePrId is defined, then following instances of MOCs must be created:
#Exactly one associated instance of MOC LNCEL-MFIRECEL.
#Following new mandatory parameters shall be initialized with their default values (see NIDD), if MFIRECEL is created:
#MFIRECEL-sPucchF0AllocStepMf
#MFIRECEL-ueCcaThreshMf
#For each MFIRECEL instance, following parameters are updated according to certain conditions:
#MFIRECEL-asyncDmtcPrId shall be created and initialized with the value of LNCEL-asyncDmtcPrId of the associated LNCEL instance if LNCEL-asyncDmtcPrId is defined.
#MFIRECEL-syncDmtcPrId shall be created and initialized with the value of LNCEL-syncDmtcPrId of the associated LNCEL instance if LNCEL-syncDmtcPrId is defined.
#MFIRECEL-sPrachNumInterlacesMf shall be created and initialized with the value of MFIREPR- sPrachNumInterlacesMf of the associated MFIREPR instance if MFIREPR-sPrachNumInterlacesMf is defined; otherwise MFIRECEL-sPrachNumInterlacesMf shall be created and initialized with the default value.
#MFIRECEL-sPrachNumRrsvInterlacesMf shall be created and initialized with the value of MFIREPR-sPrachNumRrsvInterlacesMf of the associated MFIREPR instance if MFIREPR-sPrachNumRrsvInterlacesMf is defined; otherwise MFIRECEL-sPrachNumRrsvInterlacesMf shall be created and initialized with the default value.
#MFIRECEL-sPucchF0NumRrsvInterlacesMf shall be created and initialized with the value of MFIREPR-sPucchF0NumRrsvInterlacesMf of the associated MFIREPR instance if MFIREPR-sPucchF0NumRrsvInterlacesMf is defined; otherwise MFIRECEL-sPucchF0NumRrsvInterlacesMf shall be created and initialized with the default value.
#MFIRECEL-sPucchF2NumRrsvInterlacesMf shall be created and initialized with the value of MFIREPR-sPucchF2NumRrsvInterlacesMf of the associated MFIREPR instance if MFIREPR-sPucchF2NumRrsvInterlacesMf is defined; otherwise MFIRECEL-sPucchF2NumRrsvInterlacesMf shall be created and initialized with the default value.
#MFIRECEL-sPucchNumInterlacesMf shall be created and initialized with the value of MFIREPR-sPucchNumInterlacesMf of the associated MFIREPR instance if MFIREPR-sPucchNumInterlacesMf is defined; otherwise MFIRECEL-sPucchNumInterlacesMf shall be created and initialized with the default value.
#... 


add_param minor LNCEL tempMfirePrId value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL tempMfirePrId = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/LNCEL_FDD-0 mfirePrId : 
add_cls minor LNCEL/MFIRECEL-0
dependence_add_obj minor LNCEL tempMfirePrId 1 LNCEL/MFIRECEL-0
set_operation minor MFIRECEL create
set_adaptation minor MFIRECEL NOKLTE

dependence_del_target_relative minor MOC MRBTS/LNBTS/LNCEL/MFIRECEL ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tempMfirePrId != CONST 1
dependence_del_target_relative minor MOC MRBTS/LNBTS/LNCEL/MFIRECEL ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_FDD-0 actMultefire != CONST "true"
del_param minor LNCEL tempMfirePrId

add_param minor MFIRECEL sPucchF0AllocStepMf step2
add_param minor MFIRECEL ueCcaThreshMf -72

copy_param_relative minor MRBTS/LNBTS/LNCEL MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/MFIRECEL-0 asyncDmtcPrId asyncDmtcPrId
copy_param_relative minor MRBTS/LNBTS/LNCEL MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/MFIRECEL-0 syncDmtcPrId syncDmtcPrId

add_param minor MFIRECEL sPrachNumInterlacesMf oneInterlacePerSPRACH
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/MFIRECEL sPrachNumInterlacesMf = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_FDD-0/LAA-1/MFIREPR-1 sPrachNumInterlacesMf : 
add_param minor MFIRECEL sPrachNumRrsvInterlacesMf 2
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/MFIRECEL sPrachNumRrsvInterlacesMf = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_FDD-0/LAA-1/MFIREPR-1 sPrachNumRrsvInterlacesMf : 
add_param minor MFIRECEL sPucchF0NumRrsvInterlacesMf 2
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/MFIRECEL sPucchF0NumRrsvInterlacesMf = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_FDD-0/LAA-1/MFIREPR-1 sPucchF0NumRrsvInterlacesMf : 
add_param minor MFIRECEL sPucchF2NumRrsvInterlacesMf 5
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/MFIRECEL sPucchF2NumRrsvInterlacesMf = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_FDD-0/LAA-1/MFIREPR-1 sPucchF2NumRrsvInterlacesMf : 
add_param minor MFIRECEL sPucchNumInterlacesMf 1
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/MFIRECEL sPucchNumInterlacesMf = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_FDD-0/LAA-1/MFIREPR-1 sPucchNumInterlacesMf : 






#v0.2 Add the migration path from FLF18_RADIO_1711_005/006 to FLF18SP_RADIO_1712_002
# Add the mandatory parameter LNCEL-actEDrxIdleCatM back which was relocated in FLF18_RADIO_1711_005
# Delete the mandatory parameter CATMPR-ulsMinTbsModeACatM which was added in FLF18_RADIO_1711_005
####################################################################################################################
copy_param_relative minor MRBTS/LNBTS/LNCEL/CATMCEL MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} actEDrxIdleCatM actEDrxIdleCatM
add_param minor LNCEL actEDrxIdleCatM "false"
del_param minor CATMCEL actEDrxIdleCatM
del_param minor CATMPR ulsMinTbsModeACatM
#v0.2 end





#history:
add_log minor "Conversion from FLF/FLC18_RADIO_1711_002 to FLF/FLC18SP_RADIO_1712_002"