* its corresponding values used in DU and vice-versa */
#include "common_def.h"
-#include "SN-FieldLengthUM.h"
-#include "SN-FieldLengthAM.h"
-#include "T-PollRetransmit.h"
-#include "PollPDU.h"
-#include "PollByte.h"
-#include "UL-AM-RLC.h"
-#include "T-Reassembly.h"
-#include "T-StatusProhibit.h"
-#include "DL-AM-RLC.h"
-#include "RLC-Config.h"
-#include "RLC-BearerConfig.h"
#include "BSR-Config.h"
-#include "PUCCH-Resource.h"
-#include "du_app_rlc_inf.h"
+#include "du_f1ap_conversions.h"
/************************************************************************
*
return PUCCH_Resource__format_PR_NOTHING;
}
+/************************************************************************
+ *
+ * @brief Converts BSR Periodic timer value to its ASN enum value
+ *
+ * @details
+ *
+ * Function : convertBsrPeriodicTmrValueToEnum
+ *
+ * Functionality: Converts BSR Periodic timer timer value to its ASN enum value
+ *
+ * @params[in] BSR Periodic timer value
+ * @return BSR Periodic timer ASN enum
+ *
+ * **********************************************************************/
+long convertBsrPeriodicTmrValueToEnum(int16_t periodicTmr)
+{
+ switch(periodicTmr)
+ {
+ case 1:
+ return BSR_Config__periodicBSR_Timer_sf1;
+ case 5:
+ return BSR_Config__periodicBSR_Timer_sf5;
+ case 10:
+ return BSR_Config__periodicBSR_Timer_sf10;
+ case 16:
+ return BSR_Config__periodicBSR_Timer_sf16;
+ case 20:
+ return BSR_Config__periodicBSR_Timer_sf20;
+ case 32:
+ return BSR_Config__periodicBSR_Timer_sf32;
+ case 40:
+ return BSR_Config__periodicBSR_Timer_sf40;
+ case 64:
+ return BSR_Config__periodicBSR_Timer_sf64;
+ case 80:
+ return BSR_Config__periodicBSR_Timer_sf80;
+ case 128:
+ return BSR_Config__periodicBSR_Timer_sf128;
+ case 320:
+ return BSR_Config__periodicBSR_Timer_sf320;
+ case 640:
+ return BSR_Config__periodicBSR_Timer_sf640;
+ case 1280:
+ return BSR_Config__periodicBSR_Timer_sf1280;
+ case 2560:
+ return BSR_Config__periodicBSR_Timer_sf2560;
+ case -1:
+ return BSR_Config__periodicBSR_Timer_infinity;
+ default:
+ return BSR_Config__periodicBSR_Timer_sf10;
+ }
+}
+
+/************************************************************************
+ *
+ * @brief Converts BSR Retransmission timer value to its ASN enum value
+ *
+ * @details
+ *
+ * Function : convertBsrRetxTmrValueToEnum
+ *
+ * Functionality: Converts BSR Retransmission timer timer value to its ASN enum value
+ *
+ * @params[in] BSR Retransmission timer value
+ * @return BSR Restransmission timer ASN enum
+ *
+ * **********************************************************************/
+long convertBsrRetxTmrValueToEnum(uint16_t retxTmr)
+{
+ switch(retxTmr)
+ {
+ case 10:
+ return BSR_Config__retxBSR_Timer_sf10;
+ case 20:
+ return BSR_Config__retxBSR_Timer_sf20;
+ case 40:
+ return BSR_Config__retxBSR_Timer_sf40;
+ case 80:
+ return BSR_Config__retxBSR_Timer_sf80;
+ case 160:
+ return BSR_Config__retxBSR_Timer_sf160;
+ case 320:
+ return BSR_Config__retxBSR_Timer_sf320;
+ case 640:
+ return BSR_Config__retxBSR_Timer_sf640;
+ case 1280:
+ return BSR_Config__retxBSR_Timer_sf1280;
+ case 2560:
+ return BSR_Config__retxBSR_Timer_sf2560;
+ case 5120:
+ return BSR_Config__retxBSR_Timer_sf5120;
+ case 10240:
+ return BSR_Config__retxBSR_Timer_sf10240;
+ default:
+ return BSR_Config__retxBSR_Timer_sf320;
+ }
+}
+
/************************************************************************
*
* @brief Converts LC SR Delay timer value to its ASN enum value
}
}
+/************************************************************************
+ *
+ * @brief Converts actual values into enum value of Paging DRX cycle
+ *
+ * @details
+ *
+ * Function : convertPagingCycleValueToEnum
+ *
+ * Functionality: As per Spec 38.331,
+ * Converts Actual values into enum value of Paging DRX cycle
+ *
+ *
+ * @params[in] Actual value of PagingDRX
+ * @return Enum value of DRX cycle
+ *
+ * **********************************************************************/
+e_PagingDRX convertPagingCycleValueToEnum(uint16_t pagingDrxCycle)
+{
+ switch(pagingDrxCycle)
+ {
+ case 32:
+ return PagingDRX_v32;
+ case 64:
+ return PagingDRX_v64;
+ case 128:
+ return PagingDRX_v128;
+ case 256:
+ return PagingDRX_v256;
+ default:
+ return PagingDRX_v32;
+ }
+}
+
+/************************************************************************
+ *
+ * @brief Converts enum values into actual value of Paging DRX cycle
+ *
+ * @details
+ *
+ * Function : convertPagingCycleEnumToValue
+ *
+ * Functionality: As per Spec 38.331,
+ * Converts enum values into actual value of Paging DRX cycle
+ *
+ *
+ * @params[in] Enum value of PagingDRX
+ * @return Actual value of DRX cycle
+ * Note: Returning the MAX value in case of Incorrect Enum Value as DRX
+ * cycle is MIN of Various DRX cycle
+ *
+ * **********************************************************************/
+uint16_t convertPagingCycleEnumToValue(e_PagingDRX pagingDrx)
+{
+ switch(pagingDrx)
+ {
+ case PagingDRX_v32:
+ return 32;
+ case PagingDRX_v64:
+ return 64;
+ case PagingDRX_v128:
+ return 128;
+ case PagingDRX_v256:
+ return 256;
+ default:
+ return 256;
+ }
+}
+/************************************************************************
+ *
+ * @brief Converts enum values into actual value of Num of Paging Ocassions
+ *
+ * @details
+ *
+ * Function : convertPagingOccEnumToValue
+ *
+ * Functionality: As per Spec 38.331,
+ * Converts enum values into actual value of Num of Paging Ocassion
+ *
+ *
+ * @params[in] Enum value of Ns
+ * @return Actual value of Num of Paging Ocassions
+ *
+ * **********************************************************************/
+uint8_t convertNsEnumToValue(e_PCCH_Config__ns Ns)
+{
+ switch(Ns)
+ {
+ case PCCH_Config__ns_four:
+ return 4;
+ case PCCH_Config__ns_two:
+ return 2;
+ case PCCH_Config__ns_one:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+/************************************************************************
+ *
+ * @brief Converts actual values into enum value of Num of Paging Ocassions
+ *
+ * @details
+ *
+ * Function : convertNsValueToEnum
+ *
+ * Functionality: As per Spec 38.331,
+ * Converts actual values into enum value of Num of Paging Ocassions
+ *
+ *
+ * @params[in] Actual value of Num of Paging Ocassions
+ * @return Enum value of Ns
+ *
+ * **********************************************************************/
+e_PCCH_Config__ns convertNsValueToEnum(uint8_t numPO)
+{
+ switch(numPO)
+ {
+ case 1:
+ return PCCH_Config__ns_one;
+ case 2:
+ return PCCH_Config__ns_two;
+ case 4:
+ return PCCH_Config__ns_four;
+ default:
+ return PCCH_Config__ns_one;
+ }
+}
/**********************************************************************
End of file
**********************************************************************/