(1) Begin Initialization |
(2) Timer = ; // is the timer threshold in seconds |
(3) Length = ; // is the length threshold in bytes |
(4) Load = 0; //Load at the assembler |
(5) MinBurstLength = ; // is minimum burst size |
(6) newTimer = newLength = 0; |
(7) perSecondTraffic = 0; //Load accumulator |
(8) setFuzzyMicroTimer(); // seconds micro-timer |
(9) setFuzzyMacroTimer(); // seconds macro-timer |
(10) setTimer(Timer); //Set the assembler Timer threshold |
(11) setLength(Length); //Set the assembler Length threshold |
(12) End Initialization |
(13) while (IsTrafficStillArriving?) do |
(14) perSecondTraffic = perSecondTraffic + packetSize; |
(15) if ((getTimer() == Timer) OR (getLength() == Length)) then |
(16) Call hybridBurstAssembler() Return burst; //generate a burst |
(17) setTimer(Timer); //reset the timer |
(18) setLength(Length); //reset the length counter |
(19) end if |
(20) if (getFuzzyMicroTimer() == ) then |
(21) setFuzzyMicroTimer(); |
(22) Load = perSecondTraffic; |
(23) Call FuzzyEngine(Timer, Length, Load) Return newTimer, newLength; |
(24) if (newLength ≤ MinBurstLength) then |
(25) Length = MinBurstLength; |
(26) Timer = newTimer; |
(27) else |
(28) Length = newLength; |
(29) Timer = newTimer; |
(30) end if |
(31) end if |
(32) if (getFuzzyMacroTimer() == ) then |
(33) setFuzzyMacroTimer(); //reset the fuzzy macro-timer |
(34) Load = perSecondTraffic; |
(35) perSecondTraffic = 0; //reset to zero |
(36) end if |
(37) end while |