- uint16_t sfn = rachInd->timingInfo.sfn; /* get the current timing info */
- uint16_t slot = rachInd->timingInfo.slot;
- uint16_t sfnSlot = ((sfn * 10) + slot + 1); /* scheduled in the next slot */
- uint8_t rarDelay = 0;
-
- if(sfnSlot % cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod == 0)
- {
- /* the next slot has SIB1 occasion, so send it after 2 slot */
- rarDelay = 2;
- }
- else
- {
- /* send RAR in the next slot */
- //rarDelay = 1;
- rarDelay = 2;
- }
-
- if((slot+rarDelay) % SCH_NUM_SLOTS == 0)
- {
- sfn = (sfn+1) % SCH_MAX_SFN;
- }
-
- slot = ((slot + rarDelay) % SCH_NUM_SLOTS);
-
- SchDlAlloc *dlAlloc = cell->dlAlloc[slot]; /* RAR will sent in the next slot */