QueueingNode¶
Package: sample.queueing
compound module QueueingNode
A queue in front of a server. The server is any module that implements IServer.
Usage diagram¶
Used in¶
Name |
Type |
Description |
|---|---|---|
network |
A source whose jobs are served by a QueueingNode before a sink consumes them. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
serverType |
string |
“Server” |
the NED type of the server, a module like IServer |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/network2 |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
queue.capacity |
int |
-1 |
the most jobs it holds, -1 for no limit; a job that does not fit is dropped |
Source code¶
//
// A queue in front of a server. The server is any module that implements ~IServer.
//
module QueueingNode
{
parameters:
string serverType = default("Server"); // the NED type of the server, a module like IServer
@display("i=block/network2");
gates:
input in;
output out;
submodules:
queue: FifoQueue;
server: <serverType> like IServer;
connections:
in --> queue.in;
queue.out --> server.in;
server.out --> out;
}