## 4 Implementation Details
### Generating Heterogeneous Arrivals
1. ifith CBR arrival occurs before \(j\)th EXP arrival

\(\bullet\) setPointer = \(i\)th CBR arrival
2. else

\(\bullet\) setPointer = \(j\)th EXP arrival
7. if\(i<Total\_CBR\_events\) and \(j<Total\_EXP\_events\)
8. if\(i\)th CBR arrival occurs before \(j\)th EXP arrival
9. if\(Pointer>CBR\_arrays\) (\(i\)) \(\succeq\)temp = difference between Pointer and \(i\)th CBR arrival
10. \(\succeq\)Pointer = Pointer + Delay
11. else
12. \(\succeq\)Pointer = \(i\)th CBR arrival
13. Calculate CBR delay (\(i\)) = Delay + temp
14. Increment \(i\)
15. ifith EXP arrival comes before \(i\)th CBR arrival
16. ifPointer > EXP arrivals (\(j\)) \(\succeq\)temp = difference between Pointer and \(j\)th EXP arrival
17. \(\succeq\)Pointer = Pointer + Delay
18. else
19. \(\succeq\)Pointer = \(EXP\_arrays\) (\(j\)) + Delay
20. Calculate EXP delay (\(j\)) = Delay + temp
21. Increment \(j\)
22. \(\succeq\)temp = 0; Goto step 7. 23. if\(i>Total\_CBR\_events\) and \(j<Total\_EXP\_events\)
24. ifPointer > EXP arrivals (\(j\)) \(\bullet\)temp = difference between Pointer and \(j\)th EXP arrival
25. \(\bullet\)Pointer = Pointer + Delay
26. else
27. \(\bullet\)\(\bullet\


```
1 Sort the 2D-array CRR _arrivals_ in ascending order and convert it into a 1-D array CBR arrivals
2 Set Total_CBR_events = elements in CBR arrivals. 3 Sort the 2D-array _EXP arrivals_ in ascending order and convert it into a 1-D array _EXP arrivals_
4 Set Total_EXP_events = elements in _EXP arrivals._
5 Total_Fragg = Packet Size / Fragment Size
6 Set Delays = propagation time of one Fragment + packetization time of one Fragment
7 Set DelaysPH = propagation time of a Packet + packetization time of a Packet
8 FregPtr = 1
9 Initialize variables Pointer, temp =0; i = 0; j = 0. 10 if nth CBR arrival occurs before jth EXP arrival
11 set Pointer = _i_th CBR arrival_
12 else
13 set Pointer = _j_th EXP arrival
14 if Total_CBR_events and \(<\) Total_EXP_events
15 if nth CBR arrival occurs before jth EXP arrival
16 if Pointer = _CBR arrivals_ (i)
17 temp = difference between Pointer and jth CBR arrival
18 Pointer = Pointer + Delay
19 Pointer = Pointer + Delay
20 = Pointer + Delay
21 else
22 Pointer = _i_th CBR arrival + Delay
23 Calculate CBR delay (i) = Delay + temp
24 Increment FregPtr
25 if FregPtr < Total_Freg
26 if PostPrt < EXP arrivals (i)
27 = Pointer + Delay
28 Calculate CBR delay (i) = CBR delay (i) + Delay
29 = Colto 10 a-iv. 30 else
31 \(temp\) = difference between Pointer and jth EXP arrival
32 \(Pointer\) = Pointer + DelayPH
33 Calculate EXP delay (j) = DelayPH+ temp
34 Increment \(j\)
35 else
36 Increment \(i\)
37 \(temp\) = 0
38 Goto step 10
39
40
```

**Algorithm 3**Delay Calculation for Prioritization with Fragmentation Scheme. ## 5 Experimental Settings

Due to the nature of the emergency traffic, we have selected performance criteria of'maximum delay' for performance evaluation instead of average delay. This choice has been made because in case of the critical applications such as healthcare, the user should be aware of the maximum delay which could be incurred by the protocol. In addition, we have also studied the influence of varying packet size on the Packet Drop Ratio (PDR) for traffic of both types. For illustrating the PDR, we have considered the packets which faced a delay of 2 s or more as lost. However, these packets have still been incorporated for the delay calculations and therefore, we find much higher delay values in the experimental results. Experimental set up of 100 nodes, arranged in single hop star topology was used, as shown in Figure 2. Similar topologies have been used by previous researchers for conducting performance analysis of MAC schemes dealing with heterogeneous traffic [9; 17; 31]. The topology used fundamentally depicts the communication between the cluster head and one-hop distant nodes. As shown in Figure 2, node 99 was the sink, whereas multi-sender environment was considered with nodes 0 to 98 generating heterogeneous traffic of two types at specified intervals.