| Algorithm 1: TDMA resource sharing |
|
Initialize slots array, slot time t, guard time G, and inter-frame spacing I Label: Start A Super Frame Set number of control slots, Tc Calculate the total number of data slots, T, based on Equation (12) Calculate frame_time Tf based on Equation (13) & super_frame_time Ts based on Equation (14) Label: Distribute Slots Based on QoS for i in Size (Users) Allocate Slots based on Traffic Class (TC) according to Equation (11) if Users [i] TC is AC_VO_ User.time_slots = else if Users [i] TC is AC_VI_ User.time_slots = else User.time_slots = t end end End Broadcast control Frame for Duration Tc, containing Sync Information Label:Start Transmitting Data Frame for t in slots_array, Select user, u, for transmission Transmit user u Data Wait for a Guard Time end End Wait for a time equal to inter-frame gap G Label: Start A Management Frame
If current_time >= Ts Goto Start A Super Frame else Goto Transmit Data Frame end End |