####################################
## SCFD file version: 0.2         ##
## PDDB version: TL16_1506_002    ##
####################################

#General checking for rule file execution
check_version minor TL16A
check_param minor LNBTS nCqiDtx

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

################################################################################################
# LTE2424 CRL7835 LAA (2CC) Support for Dual-Band Indoor/Outdoor FZ BTS (Pre-Rel 13)
################################################################################################
# FZM specific feature
# NEW mandatory parameter LNBTS - actLteU with value "false"
#add_param minor LNBTS actLteU false

################################################################################################
# LBT2364 CRL2817 FZM Support for LTE649
################################################################################################
# FZM specific feature

################################################################################################
# LTE2270 LTE TDD+FDD inter eNB CA basic BTS configuration 
################################################################################################
# ????? No info in CFAM !!!!!
# No impact based on compare

################################################################################################
# LTE2438 GNSS - Operation Mode and tracking
################################################################################################
# ????? No info in CFAM !!!!!
# No impact based on compare??

#Added because causes fallback if not added
add_param minor PMRNL mtGNSS 15min


################################################################################################
# LTE1536 RRC connection rejection with deprioritisation
################################################################################################
# based on CFAM no migration


################################################################################################
# LTE1987 CRL8461 Downlink Adaptive Close Loop SU MIMO (4x4) - TM9
################################################################################################
#If in TL15A configuration database the dlMimoMode is set to ('Closed Loop MIMO (4x2)' OR 'Closed Loop MIMO (4x4)') following rule need to be done during migration to TL16:
#- the introduced parameter activatedMimoTM shall be added with value 'TM4'.
#For any other dlMimoMode values the parameter activatedMimoTM shall not be added.

dependence_add_param minor LNCEL dlMimoMode "Closed Loop MIMO (4x2)" activatedMimoTM TM4
dependence_add_param minor LNCEL dlMimoMode "Closed Loop MIMO (4x4)" activatedMimoTM TM4

################################################################################################
# CRL8357 5 Mbits NBR for downlink
################################################################################################
# value range extension for LNBTS -qciTabx (where x= 5...9 and Operator) - nbrDl. No migration?


################################################################################################
# Fouded from metadata compare:
################################################################################################

################################################################################################
# LTE2206 Extended PUCCH RLF handling
################################################################################################
#Migration of parameters nCqiDtx and nCqiRec from Vendor specific to Operator specific
#Two parameters nCqiDtx and nCqiRec shall be migrated from Vendor specific to Operator specific.
#The following migration procedure applies:
#	Set the new parameters value as the new default value if no other operator specification required.
#	Set the new parameters value as the operator specification if there is an operator specification. // what this exactly means??

add_param minor LNBTS nCqiDtx 100
add_param minor LNBTS nCqiRec 2


################################################################################################
# PR042114: 	FL15A_CM: wrong time zone for russian towns
################################################################################################
# MRBTS - timeZone enum values changed as follow:
# From "(GMT+3) Europe/Kaliningrad" to "(GMT+2) Europe/Kaliningrad":
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS timeZone = PARAM MRBTS-${MRBTS} timeZone == CONST "(GMT+3) Europe/Kaliningrad" ? CONST "(GMT+2) Europe/Kaliningrad" :

# From "(GMT+2) Europe/Simferopol" to "(GMT+3) Europe/Simferopol"
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS timeZone = PARAM MRBTS-${MRBTS} timeZone == CONST "(GMT+2) Europe/Simferopol" ? CONST "(GMT+3) Europe/Simferopol" :

# From "(GMT+4) Europe/Moscow" to "(GMT+3) Europe/Moscow"
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS timeZone = PARAM MRBTS-${MRBTS} timeZone == CONST "(GMT+4) Europe/Moscow" ? CONST "(GMT+3) Europe/Moscow" :

#v0.2
#################################################################################
# PR047022 [FL00] Default value of "enbName" parameter can cause lack of OnAir 
#################################################################################
# Convert these characters (which are not supported in ASN1 printable string) according to the following rule:
# Convert all these characters to ? :  ! @ # $ % ^ & * ; / \ | ` ~
# Convert _ to 
# Convert < { [ to (
# Convert > } ] to )

#regex_replace S severity S target S 'REPLACE' S regexMatch S which S replacementString
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "_" ALL -
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "<" ALL \(
# We don't need to convers XML special characters entity references but just special characters 
#regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "&gt;" ALL \( 
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\{" ALL \(
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\[" ALL \(
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE ">" ALL \)
# We don't need to convers XML special characters entity references but just special characters 
#regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "&lt;" ALL \)
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\}" ALL \)
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\]" ALL \)
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE ":" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE ";" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "#" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "!" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "@" ALL ?
# \ is need before " to work
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\"" ALL ?
# We don't need to convers XML special characters entity references but just special characters 
#regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "&quot;" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\$" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "&" ALL ?
# We don't need to convers XML special characters entity references but just special characters 
#regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "&amp;" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "%" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "~" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "`" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "'" ALL ?
# We don't need to convers XML special characters entity references but just special characters 
#regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "&apos;" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\\" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "/" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\*" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\^" ALL ?
regex_replace minor PARAM MRBTS-*/LNBTS-* enbName REPLACE "\|" ALL ?

###########
# TDD:    #
###########

#version
set_version major TL16

#history:
add_log minor "Conversion from TL16 FB15.06_001 to T16 FB15.06_002"