FifoQueue

Package: sample.queueing

simple module FifoQueue

C++ definition

Holds the jobs until the server takes them, in the order they arrived.

sample.queueing.FifoQueueFifoQueuesimple

Usage diagram

Used in compound modules

Name

Type

Description

QueueingNode

compound module

A queue in front of a server. The server is any module that implements IServer.

Parameters

Name

Type

Default value

Description

capacity

int

-1

the most jobs it holds, -1 for no limit; a job that does not fit is dropped

Properties

Name

Value

Description

class

sample::queueing::FifoQueue

display

i=block/queue

Gates

Name

Direction

Size

Description

in

input

out

output

Signals

Name

Type

Unit

Description

length

long

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

length

queue length

timeavg,max,vector

sample-hold

Source code

//
// Holds the jobs until the server takes them, in the order they arrived.
//
simple FifoQueue
{
    parameters:
        @class(sample::queueing::FifoQueue);
        @display("i=block/queue");
        @signal[length](type=long);
        @statistic[length](title="queue length"; record=timeavg,max,vector; interpolationmode=sample-hold);
        int capacity = default(-1); // the most jobs it holds, -1 for no limit; a job that does not fit is dropped
    gates:
        input in;
        output out;
}

File: src/sample/queueing/FifoQueue.ned