📡 MAC Layer TS 38.321

⚙️ Simulate SR: data arrives, no grant → SR pending → SR sent on occasion → counter increments → grant cancels SR.

🧠 Concept & interactive simulation

📐 Scheduling Request (SR) – full procedure ⏺️ real‑time animation

📘 3GPP references

📋 LAB Configuration Guideline

1. How to configure:
- Use the sliders in the interactive box to set SR Periodicity, sr‑TransMax, sr‑ProhibitTimer, Data Size, and SR occasion offset.
- These parameters directly affect the UE's SR behaviour.

2. What will be the flow:
- Data arrives → SR pending flag is set.
- At each SR occasion (based on periodicity and offset), an SR is transmitted, counter increments, prohibit timer starts.
- If a UL grant arrives before sr‑TransMax is reached, data is transmitted and SR cancelled.
- If sr‑TransMax is reached without grant, SR failure occurs (RACH triggered).

3. What student can expect:
- Visual indicators: data buffer bar, SR pending flag, SR counter, prohibit timer, grant status.
- Arrows show SR transmission and data transmission.
- Status box updates in real time.

4. Recommended button sequence:
- First: Click Data Arrives (observe buffer and SR pending).
- Then: Click Advance Slot repeatedly – watch for SR transmission (counter increments, prohibit timer starts).
- Before max count: Click UL Grant Arrives – see data transmitted and SR cancelled.
- Alternatively: Keep clicking Advance Slot until max count – observe failure message.
- Reset to start over.