NED File src/inet/queueing/queue/PriorityQueue.ned
Name | Type | Description |
---|---|---|
PriorityQueue | compound module |
This module implements a priority queue with multiple inner queues and an optional shared memory buffer. |
Source code
// // Copyright (C) 2020 OpenSim Ltd. // // SPDX-License-Identifier: LGPL-3.0-or-later // package inet.queueing.queue; import inet.queueing.contract.IPacketBuffer; import inet.queueing.contract.IPacketClassifier; import inet.queueing.contract.IPacketQueue; import inet.queueing.contract.IPacketScheduler; // // This module implements a priority queue with multiple inner queues and an // optional shared memory buffer. // module PriorityQueue extends CompoundPacketQueueBase { parameters: int numQueues; submodules: buffer: <default("")> like IPacketBuffer if typename != "" { parameters: @display("p=100,225"); } classifier: <default("PacketClassifier")> like IPacketClassifier { parameters: @display("p=100,100"); } queue[numQueues]: <default("PacketQueue")> like IPacketQueue { parameters: bufferModule = default(exists(parent.buffer) ? "^.buffer" : ""); @display("p=300,100,column,125"); } scheduler: <default("PriorityScheduler")> like IPacketScheduler { parameters: @display("p=500,100"); } connections: in --> { @display("m=w"); } --> classifier.in; for i=0..sizeof(queue)-1 { classifier.out++ --> queue[i].in; queue[i].out --> scheduler.in++; } scheduler.out --> { @display("m=e"); } --> out; }