+
+ /* storing msg4 Pdu in macDlSlot */
+ if(macCb.macCell->macRaCb[0].msg4TxPdu)
+ {
+ msg4Alloc->msg4Info.msg4PduLen = macCb.macCell->macRaCb[0].msg4TbSize;
+ MAC_ALLOC(msg4Alloc->msg4Info.msg4Pdu, msg4Alloc->msg4Info.msg4PduLen);
+ if(msg4Alloc->msg4Info.msg4Pdu != NULLP)
+ {
+ memcpy(msg4Alloc->msg4Info.msg4Pdu, macCb.macCell->macRaCb[0].msg4TxPdu, \
+ msg4Alloc->msg4Info.msg4PduLen);
+ }
+ }
+ else
+ {
+ DU_LOG("\nMAC: Failed at macMuxPdu()");
+ }
+ /* TODO: Free all allocated memory, after the usage */
+ /* MAC_FREE(macCb.macCell->macRaCb[0].msg4TxPdu, \
+ macCb.macCell->macRaCb[0].msg4TbSize); // TODO: To be freed after re-transmission is successful.
+ MAC_FREE(macCb.macCell->macRaCb[0].msg4Pdu, macCb.macCell->macRaCb[0].msg4PduLen); */
+}
+
+/**
+ * @brief Builds and Send the Muxed Pdu to Lower MAC
+ *
+ * @details
+ *
+ * Function : buildAndSendMuxPdu
+ *
+ * Build and Sends the Muxed Pdu to Lower MAC.
+ *
+ * @param[in] SlotIndInfo *slotInd
+ * @return void
+ **/
+
+void buildAndSendMuxPdu(SlotIndInfo currTimingInfo)
+{
+ MacDlSlot *currDlSlot = NULLP;
+ SlotIndInfo muxTimingInfo;
+ memset(&muxTimingInfo, 0, sizeof(SlotIndInfo));
+
+ ADD_DELTA_TO_TIME(currTimingInfo, muxTimingInfo, PHY_DELTA);
+ currDlSlot = &macCb.macCell->dlSlot[muxTimingInfo.slot];
+ if(currDlSlot->dlInfo.msg4Alloc)
+ {
+ fillMsg4Pdu(currDlSlot->dlInfo.msg4Alloc);
+ currDlSlot = NULLP;
+ }