|
|
|
|
||
|
DEFINITION MODULE Queues; (******************************************************************* Module Queues (Version 1.0) Copyright (c) 1993-2006 by Andreas Fischlin and ETH Zurich. Purpose Utilities needed for discrete event simulations involving queues. Remarks -- Programming o Design Andreas Fischlin 17/03/1993 o Implementation Andreas Fischlin 17/03/1993 ETH Zurich Systems Ecology CHN E 35.1 Universitaetstrasse 16 8092 Zurich SWITZERLAND URLs: <mailto:RAMSES@env.ethz.ch> <http://www.sysecol.ethz.ch> <http://www.sysecol.ethz.ch/SimSoftware/RAMSES> Last revision of definition: 17/03/1993 AF *******************************************************************) FROM SimEvents IMPORT Transaction; TYPE FIFOQueue; ItemAction = PROCEDURE (Transaction); VAR notExistingFIFOQueue: FIFOQueue; (* read only *) PROCEDURE CreateFIFOQueue(VAR q: FIFOQueue; maxLength: INTEGER); PROCEDURE EmptyFIFOQueue(q: FIFOQueue); PROCEDURE FileIntoFIFOQueue(q: FIFOQueue; ta: Transaction); PROCEDURE FirstInFIFOQueue(q: FIFOQueue): Transaction; PROCEDURE Take1stFromFIFOQueue(q: FIFOQueue): Transaction; PROCEDURE FIFOQueueLength(q: FIFOQueue): INTEGER; PROCEDURE IsFIFOQueueFull(fifoq: FIFOQueue): BOOLEAN; PROCEDURE IsFIFOQueueEmpty(fifoq: FIFOQueue): BOOLEAN; PROCEDURE DoForAllInFIFOQueue(q: FIFOQueue; ia: ItemAction); PROCEDURE FIFOQueueExists(q: FIFOQueue): BOOLEAN; PROCEDURE DiscardFIFOQueue(VAR q: FIFOQueue); END Queues.
|
||
|
|
|