##########################################
## SCFD file version: 0.2               ##
## Release: FLF20B_2003_001             ##
## LTE version: FLF20B_RADIO_2003_001   ##
##########################################

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


####################################################################################################################
# PR500381 - TDD][FZM][CBRS] refine desiredPmax NIDD parameter for CBRS cell
####################################################################################################################
# If parameter LNBTS_TDD-actCbrs is set to 'true',
# the following new mandatory parameters must be initialized with following value:
# - LNCEL- CBSDCEL- desiredPmax10M should be set to the value of desiredPmax
# - LNCEL- CBSDCEL- desiredPmax20M should be set to the value of desiredPmax

add_param minor CBSDCEL desiredPmax10M 60
add_param minor CBSDCEL desiredPmax20M 60
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/CBSDCEL desiredPmax10M = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/CBSDCEL-${CBSDCEL} desiredPmax : 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL/CBSDCEL desiredPmax20M = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/CBSDCEL-${CBSDCEL} desiredPmax : 

####################################################################################################################
# LTE5761 - LTE MIMO optimized EN-DC band combination selection           on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.25275
# Migration rules for LTE5761
# During migration following tasks need to be done:
# In LNBTS object, the parameters actEnDcLteDlMimoOptBcSel and actEnDcNrFeatSetIdBcSel shall be initialized to its default value ('false').
add_param minor LNBTS actEnDcLteDlMimoOptBcSel false
add_param minor LNBTS actEnDcNrFeatSetIdBcSel false

####################################################################################################################
# LTE5104 - 5G Option 2 Aware Idle Mode Load Balancing       on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.24842
# Migration rules for LTE5104
# During migration to 20B following tasks need to be done, no matter if the BTS serves FDD or TDD cells.
# In MOC /MRBTS/LNBTS 
# the parameter actIdleLBNrAware shall be added with the default value
# there is not mandatory actB1NrBasedImlb5GSa migration rule on 02.26.2020 - check
add_param minor LNBTS actB1NrBasedImlb5GSa false


####################################################################################################################
# LTE4490 - Increase of number of X2 links to gNB            on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.25370
# Migration rules for LTE4490
# During migration to 20B following tasks need to be done, no matter if the BTS serves FDD or TDD cells.
# In LNBTS:
# the parameter actX2gNB128 shall be added with its default value
add_param minor LNBTS actX2gNB128 false


####################################################################################################################
# CRL32043 - AMLE RSRP/RSRQ source thresholds            on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.25224
# Migration rules for CRL32043
# 
# During migration following tasks need to be done:
# 
# In all instances of MOC LNCEL do the following steps (1) through (3):
# Note: In bit numbering, the LSB is counted as bit #0.
# 
# (1)
# If LNCEL-actAmle is set to 'true', then
# - if, additionally, bit #2 of the parameter LNCEL-tmpActFeat1 is set to '1' ('true'), then
# - LNCEL-actAmleServCellFilter shall be initialized with value 'true'.
# - (a) if LNCEL-tmpParam6 is not defined, LNCEL-amleServCellThreshRsrp shall be initialized with the value of -140 [dBm].
# - (b) if LNCEL-tmpParam6 is defined and LNCEL-tmpParam6 > 97, LNCEL-amleServCellThreshRsrp shall be initialized with the value of -140 [dBm].
# - (c) if LNCEL-tmpParam6 is defined and LNCEL-tmpParam6 <= 97, LNCEL-amleServCellThreshRsrp shall be initialized with the value of LNCEL-tmpParam6 - 140 [dBm].
# - else
# - LNCEL-actAmleServCellFilter shall be initialized with value 'false'.
# (2)
# - bit #2 of the parameter LNCEL-tmpActFeat1 shall be reset to value '0' ('false').
# (3)
# - the value of the parameter LNCEL-tmpParam6 shall be reset to '0'.

add_param minor LNCEL tmpActFeat1Bit2 0
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL tmpActFeat1Bit2 = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1 / CONST 8 : 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL tmpActFeat1Bit2 = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1Bit2 * CONST 2 : 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL tmpActFeat1Bit2 = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1 / CONST 4 - PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1Bit2 : 

add_param minor LNCEL actAmleServCellFilter false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL actAmleServCellFilter = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} actAmle == CONST "true" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1Bit2 == CONST 1 ? CONST "true" :

add_param minor LNCEL amleServCellThreshRsrp -140
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL amleServCellThreshRsrp = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} actAmle == CONST "true" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1Bit2 == CONST 1 && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpParam6 <= CONST 97 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpParam6 - CONST 140 :



dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL tmpParam6 = CONST 0 == CONST 0 ? CONST 0 : 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNCEL tmpActFeat1 = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1Bit2 == CONST 1 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} tmpActFeat1 - CONST 4 : 

del_param minor LNCEL tmpActFeat1Bit2

####################################################################################################################
# CRL31711/LTE5740 LTE EN-DC NR Periodic B1 Measurements / Configurable Measurement Period for B1  on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.25322
# Migration rules for CRL31711/LTE5740
# During migration to 20B following tasks need to be done, no matter if the BTS serves FDD or TDD cells.
# Step 1:
# In MOC /MRBTS/LNBTS 
# the parameter actPeriodicB1NR shall be added and initialized according to the following rule:
# if tmpActFeat1-bit#15 is equal to ‘0’    (bit#0 is LSB)
#  actPeriodicB1NR shall be initialized with the default value
# if tmpActFeat1-bit#15 is equal to ‘1’
#  actPeriodicB1NR shall be initialized with the value ‘true’
# 
# In MOC /MRBTS/LNBTS/NRDCDPR:
# if tmpActFeat1-bit#15 is equal to ‘0’   (bit#0 is LSB)
#  the parameter retryTimerB1NR shall be added with the default value
# the parameter supervisionTimerB1NR shall be added with the default value
# if tmpActFeat1-bit#15 is equal to ‘1’
# the parameter retryTimerB1NR shall be added with the value ‘0’
# the parameter supervisionTimerB1NR shall be added with the value ‘3’
# 
# Step 2:
# In MOC /MRBTS/LNBTS 
# the bit#15 of parameter tmpActFeat1 shall be set to ‘0’     (bit#0 is LSB)
# 
# 
# Note:
# CRL31711@20B replaces and extends functionality of CRL31925@20A. CRL31925 used tmpActFeat1-bit#15. After migration to new parameters, tmpActFeat1-bit#15 shall be cleared.
# 
# LTE5740@20B is full version of CRL31711@20B. It uses same parameters which were implemented with CRL31711.

add_param minor LNBTS tmpActFeat1Bit15 0
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS tmpActFeat1Bit15 = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1 / CONST 65536 : 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS tmpActFeat1Bit15 = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1Bit15 * CONST 2 : 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS tmpActFeat1Bit15 = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1 / CONST 32768 - PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1Bit15 : 

add_param minor LNBTS actPeriodicB1NR false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS actPeriodicB1NR = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1Bit15 == CONST 1 ? CONST "true" :

add_param minor NRDCDPR retryTimerB1NR 30
add_param minor NRDCDPR supervisionTimerB1NR 3 
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/NRDCDPR retryTimerB1NR       = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1Bit15 == CONST 1 ? CONST 0 :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/NRDCDPR supervisionTimerB1NR = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1Bit15 == CONST 1 ? CONST 3 :


dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS tmpActFeat1 = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1Bit15 == CONST 1 ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} tmpActFeat1 - CONST 32768 : 

del_param minor LNBTS tmpActFeat1Bit15

####################################################################################################################
# CRL31499 - LTE EN-DC FR1 FR2 NR Restriction                                                  on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.25337
# Migration rules for CRL31499    
# During migration following tasks need to be done, no matter if the BTS serves FDD or TDD cells.
#In MOC /MRBTS/LNBTS 
# If actLteNrDualConnectivity is set to 'true', the parameter nrRestrictionOverride shall be added with the default value.

dependence_add_param minor LNBTS actLteNrDualConnectivity true nrRestrictionOverride disabled



####################################################################################################################
# CRL31425 - Fast EN-DC setup without B1 measurement                           on 02.26.2020 - check
####################################################################################################################
# OM_LTE_SFS_RNL.25286
# Migration rules for CRL31425

# During migration following tasks need to be done, no matter if the BTS serves FDD or TDD cells.

# In MOC /MRBTS/LNBTS 
# the parameter actFastEndcSetup shall be added with the default value
# the parameter actFastEndcSetup is Hidden, don't care.
# new MOC NRBMDPR,nrBmdPrId.MinOccurs=0, micro don't care.


####################################################################################################################
# CRL31972	Formal NIDD parameter for LTE5602
####################################################################################################################
# Ony support Macro, not Micro
del_param minor RIAPR allowRollDwPtsbyRI
add_param minor RIAPR allowRollDwPtsByRI false

del_param minor NBIOT_FDD actNPRACHIntMitigation


####################################################################################################################
# CRL31779 - LTE5003 ("Data buffer trigger for EN-DC"): descoping TDD FZM support
####################################################################################################################
# OM_LTE_SFS_RNL.25307
# Migration rules for CRL31779
# 
# During migration to 20A following tasks need to be done, if the BTS serves TDD cells.
# 
# In MOC /MRBTS/LNBTS/NRDCDPR and in each existing /MRBTS/LNBTS/NRDCPR:
# ·	IF cellTechnology of the LNCEL represented by dynTriggerLteNrDcConfList -lcrId is equal to ‘TDD’ AND dynTriggerLteNrDcConfList -method is equal to 'coverageAndBufferBased' , THEN dynTriggerLteNrDcConfList -method shall be set to ‘coverageBased’

dependence_copy_param_value_based_on_relation_matching minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 0 lcrId    PARAM MRBTS/LNBTS/LNCEL lcrId PARAM cellTechnology
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 0 method = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR} cellTechnology == CONST "TDD" ? CONST "coverageBased" : 
del_param minor NRDCPR cellTechnology
dependence_copy_param_value_based_on_relation_matching minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 1 lcrId    PARAM MRBTS/LNBTS/LNCEL lcrId PARAM cellTechnology
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 1 method = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR} cellTechnology == CONST "TDD" ? CONST "coverageBased" : 
del_param minor NRDCPR cellTechnology
dependence_copy_param_value_based_on_relation_matching minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 2 lcrId    PARAM MRBTS/LNBTS/LNCEL lcrId PARAM cellTechnology
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 2 method = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR} cellTechnology == CONST "TDD" ? CONST "coverageBased" : 
del_param minor NRDCPR cellTechnology

dependence_copy_param_value_based_on_relation_matching minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 0 lcrId    PARAM MRBTS/LNBTS/LNCEL lcrId PARAM cellTechnology
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 0 method = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} cellTechnology == CONST "TDD" ? CONST "coverageBased" : 
del_param minor NRDCDPR cellTechnology
dependence_copy_param_value_based_on_relation_matching minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 1 lcrId    PARAM MRBTS/LNBTS/LNCEL lcrId PARAM cellTechnology
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 1 method = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} cellTechnology == CONST "TDD" ? CONST "coverageBased" : 
del_param minor NRDCDPR cellTechnology
dependence_copy_param_value_based_on_relation_matching minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 2 lcrId    PARAM MRBTS/LNBTS/LNCEL lcrId PARAM cellTechnology
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 2 method = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} cellTechnology == CONST "TDD" ? CONST "coverageBased" : 
del_param minor NRDCDPR cellTechnology

#if dynTriggerLteNrDcConfList lcrId == -1  check all LNCELS
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR  dynTriggerLteNrDcConfList 0 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR}   dynTriggerLteNrDcConfList 0 lcrId == CONST "-1" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} supportedCellTechnology == CONST "TDD" ? CONST "coverageBased" :
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 0 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} dynTriggerLteNrDcConfList 0 lcrId == CONST "-1" && PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} supportedCellTechnology == CONST "TDD" ? CONST "coverageBased" :

####################################################################################################################
# PR538780 [LTE5226][FZM][SRAN20FZ SP2] UE EN-DC can not setup when method is set to coverageAndBufferBased
####################################################################################################################
#Migration rules for PR538780
#
#During migration to SRAN20A SP2 or SRAN21A,  following tasks need to be done, no matter if the BTS serves FDD or TDD cells.
#
#In MOC /MRBTS/LNBTS/NRDCDPR and in each existing /MRBTS/LNBTS/NRDCPR:
#If dynTriggerLteNrDcConfList -method is equal to 'coverageAndBufferBased' , THEN dynTriggerLteNrDcConfList -method shall be set to ‘coverageBased’
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 0 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR} dynTriggerLteNrDcConfList 0 method == CONST "coverageAndBufferBased" ? CONST "coverageBased" : 
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 1 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR} dynTriggerLteNrDcConfList 1 method == CONST "coverageAndBufferBased" ? CONST "coverageBased" : 
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCPR dynTriggerLteNrDcConfList 2 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCPR-${NRDCPR} dynTriggerLteNrDcConfList 2 method == CONST "coverageAndBufferBased" ? CONST "coverageBased" : 

dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 0 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} dynTriggerLteNrDcConfList 0 method == CONST "coverageAndBufferBased" ? CONST "coverageBased" : 
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 1 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} dynTriggerLteNrDcConfList 1 method == CONST "coverageAndBufferBased" ? CONST "coverageBased" : 
dependence_mod_param_conditional_expression_relative   minor LISTPARAM MRBTS/LNBTS/NRDCDPR dynTriggerLteNrDcConfList 2 method = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/NRDCDPR-${NRDCDPR} dynTriggerLteNrDcConfList 2 method == CONST "coverageAndBufferBased" ? CONST "coverageBased" : 

####################################################################################################################
# CRL31865 - STOP TD-SCDMA (utraTDD) support in LTE
####################################################################################################################
# OM_LTE_SFS_RNL.25327
# Migration rules for CRL31865
# 
# During migration to 20B the following migration rules shall be executed, following the steps in the defined order:
# 
# Step 1:
#      Feature LTE736 'CS Fallback to UTRAN' shall be deactivated, i.e.
#           If LNBTS_TDD-actHOtoTdscdma is set to 'true' then set LNBTS-actCsfbPsHoToUtra to 'false'
# 
# Step 2:
#      Feature LTE898 'TDD Inter-RAT Handover to TD-SCDMA' shall be deactivated, i.e.
#           Set LNBTS_TDD-actHOtoTdscdma to 'false' 
# 
# Step 3:
#      Feature LTE1073 'Measurement based redirect to UTRAN' shall be deactivated, i.e.
#           Set LNBTS_TDD-prohibitPsHOtoTdscdma to 'false'
# 
# Step 4: 
#      Feature LTE2447' Deactivation of B2 for TD-SCDMA PS HO and redirection with VoLTE UE' 
#      shall be deactivated, i.e.
#           Set LNBTS_TDD-actB2SupprTdscdmaWithVoLte to 'false'
# 
# Step 5:
#      The following features shall be deactivated for TD-SCDMA targets: 
#           - LTE1664 'TD-SCDMA redirect with multiple frequencies'
#           - LTE423 'RRC connection release with redirect'
#           - LTE562 'CSFB to UTRAN or GSM via redirect'
#           - LTE22 'Emergency call handling'.
#      This is achieved as follows:
#           For each existing REDRT object instance:
#                If REDRT-redirRat is configured to 'utraTDD' then delete this REDIRT object instance
#           For each existing MODRED object instance:
#                If MODRED-redirRAT is configured to 'utraTDD' then delete this MODRED object instance
#           For each existing MORED object instance:
#                If MORED-redirRAT is configured to 'utraTDD' then delete this MORED object instance
# 
# Step 6:
#      Due to the removal of object instances in Step 5, it could happen that now some consistency checks
#      are not fullfilled anymore. Therefore, some further migration rules are needed in order to 'clean-up' 
#      the configuration and adapt to a configuration where no REDRT, MODRED, and MORED with TD-SCDMA
#      target exists anymore, in order to satisfy the consistency checks.
#     
#      The following migration rules shall be executed:
#           If after Step 5 no REDRT object instance exists anymore then
#                - Set LNBTS-actRedirect to 'disabled' (deactivate LTE423)
#                - Set LNBTS-actCSFBRedir to 'Disabled' (deactivate LTE562)
#                - Set LNBTS-actEmerCallRedir to 'Disabled' (deactivate LTE22)
#                - Delete structure LNCEL-rsrqRedirectParams and its contained parameters in all existing LNCEL object instances (deactivate LTE1407)
# 
#           else (if after Step 5 at least one REDRT object instance still exists) then
#                - if REDRT-emerCallPrio does not exist in any of the existing REDRT object instances then 
#                     - Set LNBTS-actEmerCallRedir to 'Disabled'
#                - If REDRT-csFallBPrio does not exist in any of the existing REDRT object instances then
#                     - Set LNBTS-actCSFBRedir to 'Disabled'
#                - If REDRT-redirectPrio does not exist in any of the existing REDRT object instances then
#                     - Set LNBTS-actRedirect to 'disabled'
# 
# Step 7:
#      Objects related to Idle Load Mobility need to be cleaned-up from TD-SCDMA frequency lists.
#      The following migration rules shall be executed:
#           For each existing LNCEL object instance with LNCEL-cellTechnology = 'TDD':
#                -  if child object UFFIM exists:
#                     - If there exists at least one item of structure utrFddCarFrqL in this UFFIM object instance:
#                          - remove all existing items of structure utrTddCarFrqL in this UFFIM object instance
#                     - else (i.e. no item of structure utrFddCarFrqL exists in this UFFIM object instance)
#                          - remove the UFFIM object instance
#                          - if in the SIB object instance of the same LNCEL object instance there
#                            exists a structure item of sibSchedulingList which has parameter 
#                            sibSchedulingList-siMessageSibType = 'SIB6', then remove this item of sibSchedulingList.
# 
#           For each existing MODIMP object instance:
#                - remove all existing items of structure MODIMP-utrTddCarFrqL
# 
#           For each existing MOIMP object instance:
#                - remove all existing items of structure MOIMP-utrTddCarFrqL
#           
#    
# Step 8 (PR506298):
#      The REDRT, MODRED, and MORED object instances could in theory include a TD-SCDMA frequency list redirFreqUtraTDDL even if the related parameter REDRT-redirRat, MODRED-redirRAT, MORED-redirRAT is not set to 'utraTDD'. Therefore, in order to clean-up the configuration from any TD-SCDMA frequency list used for redirection (redirFreqUtraTDDL), all the occurences of redirFreqUtraTDDL in the configuration shall be removed.
#      Therefore, the following migration rule shall be executed:
# 
#           For each existing REDRT object instance:
#                If REDRT-redirFreqUtraTDDL  exists, then delete it from the REDRT object instance
#           For each existing MODRED object instance:
#                If MODRED-redirFreqUtraTDDL exists, then delete it from the MODRED object instance
#           For each existing MORED object instance:
#                If MORED-redirFreqUtraTDDL exists, then delete it from the MORED object instance


# step 1
# If LNBTS_TDD-actHOtoTdscdma is set to 'true' then set LNBTS-actCsfbPsHoToUtra to 'false'
# jinhua check TLF20C_radio_2007_001, the paramter actCsfbPsHoToUtra is mandatory and not hidden,default value: false  --> feature switch on/off
add_param minor LNBTS actCsfbPsHoToUtra false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS actCsfbPsHoToUtra = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNBTS_TDD-* actHOtoTdscdma == CONST "true" ? CONST "false" :

# step 2
# Set LNBTS_TDD-actHOtoTdscdma to 'false' 
# jinhua check TLF20C_radio_2007_001, the paramter actHOtoTdscdma is mandatory and not hidden,default value: false  --> feature switch on/off
add_param minor LNBTS_TDD actHOtoTdscdma false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNBTS_TDD actHOtoTdscdma = CONST "0" == CONST "0"  ? CONST "false" :

# step 3
# Set LNBTS_TDD-prohibitPsHOtoTdscdma to 'false'
# jinhua check TLF20C_radio_2007_001, the paramter prohibitPsHOtoTdscdma is mandatory and not hidden,default value: false  --> feature switch on/off
add_param minor LNBTS_TDD prohibitPsHOtoTdscdma false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNBTS_TDD prohibitPsHOtoTdscdma = CONST "0" == CONST "0"  ? CONST "false" :

# step 4
# Set LNBTS_TDD-actB2SupprTdscdmaWithVoLte to 'false'
# jinhua check TLF20C_radio_2007_001, the paramter actB2SupprTdscdmaWithVoLte is mandatory and not hidden,default value: false  --> feature switch on/off
add_param minor LNBTS_TDD actB2SupprTdscdmaWithVoLte false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS/LNBTS_TDD actB2SupprTdscdmaWithVoLte = CONST "0" == CONST "0"  ? CONST "false" :

# step 5
#      This is achieved as follows:
#           For each existing REDRT object instance:
#                If REDRT-redirRat is configured to 'utraTDD' then delete this REDRT object instance
#           For each existing MODRED object instance:
#                If MODRED-redirRAT is configured to 'utraTDD' then delete this MODRED object instance
#           For each existing MORED object instance:
#                If MORED-redirRAT is configured to 'utraTDD' then delete this MORED object instance
dependence_del_target_relative minor MOC MRBTS/LNBTS/LNCEL/REDRT  ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/REDRT-${REDRT} redirRat == CONST "utraTDD"
dependence_del_target_relative minor MOC MRBTS/LNBTS/MODPR/MODRED ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/MODPR-${MODPR}/MODRED-${MODRED} redirRat == CONST "utraTDD"
dependence_del_target_relative minor MOC MRBTS/LNBTS/MOPR/MORED   ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/MOPR-${MOPR}/MORED-${MORED} redirRat == CONST "utraTDD"

# Step 6 by jadwiga.jedrzejewska@nokia.com teach me on June 12 2020
function_relative minor PARAM MRBTS/LNBTS emerCallPrioExists = min int ( CONST 7 PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-*/REDRT-* emerCallPrio )
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS actEmerCallRedir = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} emerCallPrioExists == CONST 7 ? CONST "Disabled" :
del_param minor LNBTS emerCallPrioExists
function_relative minor PARAM MRBTS/LNBTS csFallBPrioExists = min int ( CONST 7 PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-*/REDRT-* csFallBPrio )
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS actCSFBRedir = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} csFallBPrioExists == CONST 7 ? CONST "Disabled" :
del_param minor LNBTS csFallBPrioExists
function_relative minor PARAM MRBTS/LNBTS redirectPrioExists = min int ( CONST 9 PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-*/REDRT-* redirectPrio )
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/LNBTS actRedirect = PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} redirectPrioExists == CONST 9 ? CONST "disabled" :
del_param minor LNBTS redirectPrioExists
dependence_del_target_relative minor LIST MRBTS/LNBTS/LNCEL rsrqRedirectParams ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS} actRedirect == CONST "disabled"

# step 7 by jadwiga.jedrzejewska@nokia.com teach me on June 12 2020
dependence_del_target_relative minor LIST MRBTS/LNBTS/LNCEL/UFFIM utrTddCarFrqL ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} cellTechnology == CONST "TDD" && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/UFFIM-${UFFIM} utrFddCarFrqL 0 dlCarFrqUtra < CONST 17000
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/SIB sibSchedulingList ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} cellTechnology == CONST "TDD" && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/UFFIM-1 utrTddCarFrqL 0 dlCarFrqUtra < CONST 17000 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/SIB-${SIB} sibSchedulingList ${sibSchedulingList} siMessageSibType == CONST "SIB6"
dependence_del_target_relative minor MOC MRBTS/LNBTS/LNCEL/UFFIM ? PARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL} cellTechnology == CONST "TDD" && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/UFFIM-${UFFIM} utrTddCarFrqL 0 dlCarFrqUtra < CONST 17000
del_list minor MODIMP utrTddCarFrqL
del_list minor MOIMP utrTddCarFrqL

# step 8
del_param minor REDRT  redirFreqUtraTDDL
del_param minor MODRED redirFreqUtraTDDL
del_param minor MORED  redirFreqUtraTDDL

# Migration rules for LTE4572-A / PR498949
# During migration to a SW build which includes NIDD version xL20B_2003_001 following tasks need to be done, no matter if the BTS serves FDD or TDD cells.

# Step 1:
# In MOC /MRBTS/LNBTS/LNCEL/NRFIM 
# If in NRFIM-nrCarFrqL multiple instances are configured with same dlCarFrqNr value, eNB shall only keep the first instance, while all the other instances with that dlCarFrqNr value shall be deleted.

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 7 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 6 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 6 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 6 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 6 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 6 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 6 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 6 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 5 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 5 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 5 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 5 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 5 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 5 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 4 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 4 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 4 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 4 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 4 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 3 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 3 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 3 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 3 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 2 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr
dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 2 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 2 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr

dependence_del_target_relative minor LISTITEM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL 1 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 1 dlCarFrqNr == LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL 0 dlCarFrqNr


# Step2:
# In MOC /MRBTS/LNBTS/LNCEL/NRFIM 
# For each dlCarFrqNr in the list nrCarFrqL of each NRFIM the parameter dlCarFrqNr shall be updated with re-calculated value using the following algorithm:
#set  GSCN = current value of dlCarFrqNr
#If 2 <=  GSCN  <= 7498:
#   N = int(GSCN / 3)
#   M = (GSCN mod 3) * 2 + 3
#   If M == 7:
#       M = 1
#       N = N + 1
#   Frequency = N * 1,200 + M* 50   
#   Set dlCarFrqNr   = (Frequency – 0)/5 + 0 = Frequency/5
#Else If 7499 <= GSCN  <= 22255:
#    N = GSCN – 7499
#    Frequency = 3,000,000 + N * 1,440
#    Set dlCarFrqNr   = (Frequency – 3,000,000)/15 + 600,000
#                     = N * 1,440/15 + 600,000 = N * 96 + 600,000 #easier
#Else If 22256 <= GSCN  <= 26639:
#    N = GSCN – 22256
#    Frequency = 24,250,080 + N * 17,280
#    Set dlCarFrqNr   = (Frequency – 24,250,080)/60 + 2,016,667
#                     = N * 17,280/60  + 2,016,667 = N * 288 + 2,016,667 #easier

add_list_param minor NRFIM nrCarFrqL * tempGSCN tempValue
add_list_param minor NRFIM nrCarFrqL * tempN tempValue
add_list_param minor NRFIM nrCarFrqL * tempGSCNmod3 tempValue
add_list_param minor NRFIM nrCarFrqL * tempM tempValue
add_list_param minor NRFIM nrCarFrqL * tempFrequency tempValue
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempGSCN = CONST 0 == CONST 0 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} dlCarFrqNr :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempN = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN / CONST 3 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempGSCNmod3 = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempN * CONST 3 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempGSCNmod3 = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN - LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCNmod3 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempM = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCNmod3 * CONST 2 + CONST 3 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempN = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempM == CONST 7 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempN + CONST 1 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempM = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempM == CONST 7 ? CONST 1 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempFrequency = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempN * CONST 1200 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempFrequency = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempM * CONST 50 + LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempFrequency :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * dlCarFrqNr = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 2 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 7498 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempFrequency / CONST 5 :

dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempN = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 7499 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 22255 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN - CONST 7499 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * dlCarFrqNr = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 7499 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 22255 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempN * CONST 96 + CONST 600000 :

dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * tempN = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 22256 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 26639 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN - CONST 22256 :
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/LNBTS/LNCEL/NRFIM nrCarFrqL * dlCarFrqNr = LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN >= CONST 22256 && LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempGSCN <= CONST 26639 ? LISTPARAM MRBTS-${MRBTS}/LNBTS-${LNBTS}/LNCEL-${LNCEL}/NRFIM-${NRFIM} nrCarFrqL ${nrCarFrqL} tempN * CONST 288 + CONST 2016667 :

del_list_param minor NRFIM nrCarFrqL tempGSCN
del_list_param minor NRFIM nrCarFrqL tempN
del_list_param minor NRFIM nrCarFrqL tempGSCNmod3
del_list_param minor NRFIM nrCarFrqL tempM
del_list_param minor NRFIM nrCarFrqL tempFrequency

#history:
add_log minor "Conversion from FLF20B_RADIO_2002_001 to FLF20B_RADIO_2003_001"
