Server

Package: sample.queueing

simple module Server

C++ definition

Serves one job at a time, each for its service time, and asks its queue for the next one when it is idle.

sample.queueing.ServerServersimple

Inheritance diagram

Parameters

Name

Type

Default value

Description

serviceTime

double

exponential(0.5s)

service time of a short job

Properties

Name

Value

Description

class

sample::queueing::Server

display

i=block/server

Gates

Name

Direction

Size

Description

in

input

out

output

Signals

Name

Type

Unit

Description

busy

bool

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

busy

server busy

timeavg,vector

sample-hold

Source code

//
// Serves one job at a time, each for its service time, and asks its queue for the next one when it is idle.
//
simple Server like IServer
{
    parameters:
        @class(sample::queueing::Server);
        @display("i=block/server");
        @signal[busy](type=bool);
        @statistic[busy](title="server busy"; record=timeavg,vector; interpolationmode=sample-hold);
        volatile double serviceTime @unit(s) = default(exponential(0.5s)); // service time of a short job
    gates:
        input in;
        output out;
}

File: src/sample/queueing/Server.ned