| Input: |
| {Slot1, Slot2,…, Slotn} Idle timeslots obtained from GCL list. Each timeslot includes end time, start time, and timeslot length; |
| Set S of frames to be transmitted in S1 queue; |
| output: |
| {frame.Q } Selected data frame entering queue Q |
| {W.start} Transmission time of data frame |
| (1) WHILE S is not empty THEN |
| (2) IF the number of frame in S is 1 |
| (3) Calculate the earliest Slot that can transmit the frame as W.start |
| (4) Update Slot |
| (5) ELSE |
| (6) Frame_number←get_Frame_number(S); |
| // Determine the number of frames to be scheduled according to the number of waiting frames in S |
| (7) |
| (8) FOR (i = 1; i++; i < Frame_number) |
| (9) Calculate the Slot set that can transmit the all frame; |
| (10) END FOR |
| (11) FOR (i = 1; i++; i < Frame_number) |
| (12) SlotM ← get_feasible_slot(Slot) |
| //Select the largest data frame to be scheduled, and select the transmissible slot with the most matching length |
| (13) Update Slot |
| (14) According SlotM to get W.start // W.start of each frame can be calculated |
| (15) END FOR |
| // The above is to select the timeslot and get W.start. Next, determine the incoming queue Qm |
| (16) FOR (i = 1; i++; i <Q_number) // The secondary queue contains four queues. Now, determine Q.end. |
| (17) IF Q.end <time_now |
| (18) Q.end = time_now |
| (19) END IF |
| (20) END FOR |
| (21) FOR (i = 1; i++; i < Frame_number) |
| (22) Select the queue of min (W.start-Q.end) as frame.Q; // Determine the incoming queue for each frame |
| (23) Q.end = W.start + frame; //Update Q.end |
| (24) END FOR |
| (25) END IF |
| (26) END WHILE |