+/*******************************************************************
+ *
+ * @brief Converts DU specific failure cause to E2 interface
+ * failure cause
+ *
+ * @details
+ *
+ * Function : convertDuCauseToE2Cause
+ *
+ * Functionality: Converts DU specific failure cause to E2
+ * interface failure cause
+ *
+ * @params[in] DU specific failure cause
+ * E2 specific failure cause
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void convertDuCauseToE2Cause(CauseOfResult l2Cause, E2FailureCause *failureCause)
+{
+ switch(l2Cause)
+ {
+ case PARAM_INVALID:
+ {
+ failureCause->causeType = E2_RIC_REQUEST;
+ failureCause->cause = E2_ACTION_NOT_SUPPORTED;
+ break;
+ }
+ case RESOURCE_UNAVAILABLE:
+ {
+ failureCause->causeType = E2_RIC_REQUEST;
+ failureCause->cause = E2_FUNCTION_RESOURCE_LIMIT;
+ break;
+ }
+ default:
+ {
+ failureCause->causeType = E2_RIC_REQUEST;
+ failureCause->cause = E2_RIC_REQUEST_CAUSE_UNSPECIFIED;
+ break;
+ }
+ }
+}
+